mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
parent
a828218d15
commit
1d66a8b127
1 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,4 @@
|
|||
<script>
|
||||
// TODO: emit current selected tile
|
||||
let className = undefined;
|
||||
export { className as class };
|
||||
export let selected = false;
|
||||
|
@ -12,9 +11,15 @@
|
|||
export let light = false;
|
||||
export let style = undefined;
|
||||
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import CheckmarkFilled16 from 'carbon-icons-svelte/lib/CheckmarkFilled16';
|
||||
import { cx } from '../../lib';
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
$: if (selected) {
|
||||
dispatch('select', id);
|
||||
}
|
||||
$: _class = cx(
|
||||
'--tile',
|
||||
'--tile--selectable',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue