mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
docs(button): improve usage for icon-only, link buttons
This commit is contained in:
parent
41284a2570
commit
5feb51b327
1 changed files with 9 additions and 1 deletions
|
@ -42,10 +42,18 @@ description: High-level description
|
|||
|
||||
### Icon-only button
|
||||
|
||||
<Button icon={Add16} hasIconOnly tooltipPosition="bottom" tooltipAlignment="center" iconDescription="Tooltip text" />
|
||||
Set `hasIconOnly` to `true` to use the icon-only button variant.
|
||||
|
||||
**Note:** you must provide an `iconDescription` for the button tooltip.
|
||||
|
||||
The tooltip position and alignment can be controlled by the `tooltipPosition`, `tooltipAlignment` props, respectively.
|
||||
|
||||
<Button hasIconOnly tooltipPosition="bottom" tooltipAlignment="center" iconDescription="Tooltip text" icon={Add16} />
|
||||
|
||||
### Link button
|
||||
|
||||
If an `href` value is specified, the component will render an [anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) with a "button" role.
|
||||
|
||||
<Button href="#">Link button</Button>
|
||||
|
||||
### Custom element
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue