mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
parent
e8be9280c7
commit
d4db64e2d1
3 changed files with 62 additions and 0 deletions
|
@ -0,0 +1,21 @@
|
|||
<script>
|
||||
import { TileGroup, RadioTile } from "carbon-components-svelte";
|
||||
|
||||
const values = ["Lite plan", "Standard plan", "Plus plan"];
|
||||
|
||||
let selected = values[0];
|
||||
</script>
|
||||
|
||||
<TileGroup
|
||||
legend="Service pricing tiers"
|
||||
on:select="{({ detail }) => (selected = detail)}"
|
||||
>
|
||||
{#each values as value}
|
||||
<RadioTile value="{value}" checked="{selected === value}">{value}</RadioTile
|
||||
>
|
||||
{/each}
|
||||
</TileGroup>
|
||||
|
||||
<br />
|
||||
|
||||
Selected: <strong>{selected}</strong>
|
Loading…
Add table
Add a link
Reference in a new issue