diff --git a/src/components/Button/README.md b/src/components/Button/README.md index 5c77aa3..674953b 100644 --- a/src/components/Button/README.md +++ b/src/components/Button/README.md @@ -71,6 +71,26 @@ import { BBButton } from 'bbb-ui-components-react'; (console.log('clicked'))}/> ``` +### Long Labels + +`labelOverflow` sets what happens when the label doesn't fit the button's available width, for example a `fullWidth` button in a narrow container or a row of equal-width buttons. It has no visible effect while the label fits. + +- `nowrap` (default): the label stays on one line. The button grows to fit it, or the label overflows when the button can't grow. +- `wrap`: the label breaks onto more lines, making the button taller. +- `ellipsis`: the label is truncated with an ellipsis, and the button can shrink below its label's width as a flex item. While truncated, hovering or focusing the button shows the full label in a tooltip, unless `tooltipLabel` is set. + +```jsx +import styled from 'styled-components'; +import { BBButton } from 'bbb-ui-components-react'; + +const RoomActionButton = styled(BBButton)` + flex: 1 1 10rem; +`; + + (console.log('clicked'))}/> + (console.log('clicked'))}/> +``` + ### Extending with `styled()` `className` is forwarded to the root element (the `