import * as React from 'react';
import Icon from '../../icons/general/IconCopy';
import * as vars from '../../styles/variables';
import PlainButton from './PlainButton';
import { ButtonType } from '../button';
import notes from './PlainButton.stories.md';
export const regular = () => (
By default the PlainButton component has margins set to 0.
The layout jumps on hover if margin overrides are not set for the :active and :hover states.
{`
.bdl-SpecialButtonBug {
margin: $bdl-grid-unit*2;
}
`}
Workaround - use bdl-Button-margins mixin to define margins.
{`
.bdl-SpecialButtonFix {
@include bdl-Button-margins($bdl-grid-unit*2);
}
`}
You can set all 4 margins inline using shorthand property syntax.
{`
.bdl-SpecialButtonFix2 {
@include bdl-Button-margins($bdl-grid-unit*2 $bdl-grid-unit*3 0 $bdl-grid-unit*4);
}
`}
Why not fix this? We will eventually, but since this behavior is relied upon in many places it is a breaking change that needs to be rolled out strategically.
> ); export default { title: 'Components/Buttons/PlainButton', component: PlainButton, parameters: { notes, }, };