Skip to content

Commit

Permalink
Update docs for customizing button widths (#1973)
Browse files Browse the repository at this point in the history
Currently, the docs state that you can set a width attribute to
customize the width of buttons, but no such attribute exists. I've
updated the docs to direct people to set a custom width via CSS through
inline styles or a custom class.
  • Loading branch information
danny-andrews authored Apr 11, 2024
1 parent d0b71ad commit c6da4f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/pages/components/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ When a `target` is set, the link will receive `rel="noreferrer noopener"` for [s

### Setting a Custom Width

As expected, buttons can be given a custom width by setting the `width` attribute. This is useful for making buttons span the full width of their container on smaller screens.
As expected, buttons can be given a custom width by passing inline styles to the component (or using a class). This is useful for making buttons span the full width of their container on smaller screens.

```html:preview
<sl-button variant="default" size="small" style="width: 100%; margin-bottom: 1rem;">Small</sl-button>
Expand Down

0 comments on commit c6da4f5

Please sign in to comment.