mirror of
https://github.com/bitwarden/browser
synced 2025-12-31 07:33:23 +00:00
adds button story and docs for button with icon spacing (#14198)
* add story & docs for button with icon spacing * add back block story removed in error * remove unnecessary args
This commit is contained in:
@@ -73,6 +73,27 @@ where the width is fixed and the text wraps to 2 lines if exceeding the button
|
||||
|
||||
<Canvas of={stories.Block} />
|
||||
|
||||
## With Icon
|
||||
|
||||
To ensure consistent icon spacing, the icon should have .5rem spacing on left or right(depending on
|
||||
placement).
|
||||
|
||||
> NOTE: Use logical css properties to ensure LTR/RTL support.
|
||||
|
||||
**If icon is placed before button label**
|
||||
|
||||
```html
|
||||
<i class="bwi bwi-plus tw-me-2"></i>
|
||||
```
|
||||
|
||||
**If icon is placed after button label**
|
||||
|
||||
```html
|
||||
<i class="bwi bwi-plus tw-ms-2"></i>
|
||||
```
|
||||
|
||||
<Canvas of={stories.WithIcon} />
|
||||
|
||||
## Accessibility
|
||||
|
||||
Please follow these guidelines to ensure that buttons are accessible to all users.
|
||||
|
||||
Reference in New Issue
Block a user