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