fix(radio-button-group): strongly type dispatched change/select events (#1819)

This commit is contained in:
Eric Liu 2023-10-03 11:23:17 -07:00 committed by GitHub
commit 06d81ddbff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 42 additions and 18 deletions

View file

@ -2,7 +2,13 @@
import { RadioButton, RadioButtonSkeleton, RadioButtonGroup } from "../types";
</script>
<RadioButtonGroup legendText="Storage tier (disk)" selected="standard">
<RadioButtonGroup
legendText="Storage tier (disk)"
selected="standard"
on:change="{(e) => {
console.log(e.detail); // string
}}"
>
<RadioButton labelText="Free (1 GB)" value="free" />
<RadioButton labelText="Standard (10 GB)" value="standard" />
<RadioButton labelText="Pro (128 GB)" value="pro" />