mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
parent
d01995e11e
commit
b37f0a90c9
2 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
import TextBold16 from "carbon-icons-svelte/lib/TextBold16";
|
import TextBold16 from "carbon-icons-svelte/lib/TextBold16";
|
||||||
import TextItalic16 from "carbon-icons-svelte/lib/TextItalic16";
|
import TextItalic16 from "carbon-icons-svelte/lib/TextItalic16";
|
||||||
import TextUnderline16 from "carbon-icons-svelte/lib/TextUnderline16";
|
import TextUnderline16 from "carbon-icons-svelte/lib/TextUnderline16";
|
||||||
|
import Login16 from "carbon-icons-svelte/lib/Login16";
|
||||||
import Preview from "../../components/Preview.svelte";
|
import Preview from "../../components/Preview.svelte";
|
||||||
|
|
||||||
let index = 1;
|
let index = 1;
|
||||||
|
@ -54,6 +55,10 @@
|
||||||
|
|
||||||
<Button iconDescription="Tooltip text" icon={Add16} />
|
<Button iconDescription="Tooltip text" icon={Add16} />
|
||||||
|
|
||||||
|
### Icon-only, link button
|
||||||
|
|
||||||
|
<Button iconDescription="Login" icon={Login16} href="#" />
|
||||||
|
|
||||||
### Icon-only button (custom tooltip position)
|
### Icon-only button (custom tooltip position)
|
||||||
|
|
||||||
The tooltip position and alignment can be controlled by `tooltipPosition` and `tooltipAlignment`.
|
The tooltip position and alignment can be controlled by `tooltipPosition` and `tooltipAlignment`.
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
$: buttonProps = {
|
$: buttonProps = {
|
||||||
type: href && !disabled ? undefined : type,
|
type: href && !disabled ? undefined : type,
|
||||||
tabindex,
|
tabindex,
|
||||||
disabled,
|
disabled: disabled === true ? true : undefined,
|
||||||
href,
|
href,
|
||||||
"aria-pressed": hasIconOnly && kind === "ghost" ? isSelected : undefined,
|
"aria-pressed": hasIconOnly && kind === "ghost" ? isSelected : undefined,
|
||||||
...$$restProps,
|
...$$restProps,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue