mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
parent
6c75c8a973
commit
b8a5d7bdcc
3 changed files with 6 additions and 8 deletions
|
@ -4,7 +4,5 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Layout>
|
<Layout>
|
||||||
<div>
|
|
||||||
<TooltipDefinition {...$$props}>Defintion Tooltip</TooltipDefinition>
|
<TooltipDefinition {...$$props}>Defintion Tooltip</TooltipDefinition>
|
||||||
</div>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
export let triggerClassName = undefined;
|
export let triggerClassName = undefined;
|
||||||
export { triggerClassName as triggerClass };
|
export { triggerClassName as triggerClass };
|
||||||
export let tooltipText = '';
|
export let tooltipText = '';
|
||||||
export let props = {};
|
export let style = undefined;
|
||||||
|
|
||||||
import { cx } from '../../lib';
|
import { cx } from '../../lib';
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div {...props} class={_class}>
|
<div class={_class} {style}>
|
||||||
<button
|
<button
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
export let align = 'center';
|
export let align = 'center';
|
||||||
export let id = Math.random();
|
export let id = Math.random();
|
||||||
export let tooltipText = '';
|
export let tooltipText = '';
|
||||||
export let props = {};
|
export let style = undefined;
|
||||||
|
|
||||||
import { cx } from '../../lib';
|
import { cx } from '../../lib';
|
||||||
|
|
||||||
|
@ -19,13 +19,13 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
{...props}
|
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
on:mouseenter
|
on:mouseenter
|
||||||
on:mouseleave
|
on:mouseleave
|
||||||
|
aria-describedby={id}
|
||||||
class={_class}
|
class={_class}
|
||||||
aria-describedby={id}>
|
{style}>
|
||||||
<span class={cx('--assistive-text')} {id}>{tooltipText}</span>
|
<span class={cx('--assistive-text')} {id}>{tooltipText}</span>
|
||||||
<slot />
|
<slot />
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue