import * as React from 'react'; import { action } from 'storybook/actions'; import * as vars from '../../styles/variables'; import PrimaryButton from '../primary-button'; import Icon from '../../icon/line/Plus16'; import Icon2 from '../../icons/general/IconEllipsis'; // @ts-ignore flow import import InlineNotice from '../inline-notice'; import Button from './Button'; import notes from './Button.stories.md'; export const regular = () => { return ; }; export const loading = () => ; export const disabled = () => ; export const withRadar = () => ; export const large = () => ; export const iconButton = () => ); export const fixingMargins = () => ( <> The PlainButton variant has a margin of 0 and needs special handling due to how the margin is defined for hover/active states.
The methods shown below will cause problems for PlainButton. See PlainButton docs for details.

By default there are 5px margins on all sides of the Button and PrimaryButton components.

Action

A quick fix to remove the margins is to add the man (margin-all-none) or mrn/ mln/mhn/mvn (right/left/horizontal/vertical) utility classes.

Action (mrn)

Alternately, you can create a CSS class and customize as needed.

                
                    {`
        .bdl-SpecialButton {
            margin: 0 $bdl-grid-unit;
        }
                    `}
                
            

); export default { title: 'Components/Buttons/Button', component: Button, parameters: { notes, }, };