diff --git a/packages/eds-core-react/src/components/Button/Button.docs.mdx b/packages/eds-core-react/src/components/Button/Button.docs.mdx index 516b8f3935..7fee7e52ef 100644 --- a/packages/eds-core-react/src/components/Button/Button.docs.mdx +++ b/packages/eds-core-react/src/components/Button/Button.docs.mdx @@ -115,7 +115,7 @@ Tooltip accessible for people using keyboard navigation, as the button is still ### Full width -Use boolean prop `fullWidth` +When stretching a button beyond its intrinsic width, the `fullWidth` prop can be used to position icon at the edge. diff --git a/packages/eds-core-react/src/components/Button/Button.stories.tsx b/packages/eds-core-react/src/components/Button/Button.stories.tsx index ec9555021c..7f826e33e9 100644 --- a/packages/eds-core-react/src/components/Button/Button.stories.tsx +++ b/packages/eds-core-react/src/components/Button/Button.stories.tsx @@ -286,7 +286,18 @@ WithTooltip.storyName = 'Disabled buttons and tooltip' export const FullWidth: StoryFn = () => ( <> - + + + ) FullWidth.storyName = 'Full width' diff --git a/packages/eds-core-react/src/components/Button/Button.tsx b/packages/eds-core-react/src/components/Button/Button.tsx index ff2f1a0aea..3bed76042f 100644 --- a/packages/eds-core-react/src/components/Button/Button.tsx +++ b/packages/eds-core-react/src/components/Button/Button.tsx @@ -163,7 +163,7 @@ export type ButtonProps = { * @default 'button' */ type?: string - /** FullWidth (stretched) button */ + /** Floats icon to the side if button is stretched beyond its intrinsic width */ fullWidth?: boolean } & ButtonHTMLAttributes