From bc29d9ee0dd6140e4df8ef5c97f62b76f3914c19 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sun, 22 Nov 2020 09:25:05 -0800 Subject: [PATCH] docs(radio-button): add reactive example --- docs/src/pages/components/RadioButton.svx | 6 ++++ .../ProgrammaticRadioButton.svelte | 36 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte diff --git a/docs/src/pages/components/RadioButton.svx b/docs/src/pages/components/RadioButton.svx index 189e3ffc..b1aed1ce 100644 --- a/docs/src/pages/components/RadioButton.svx +++ b/docs/src/pages/components/RadioButton.svx @@ -17,6 +17,12 @@ components: ["RadioButtonGroup", "RadioButton", "RadioButtonSkeleton"] +### Programmatic usage + +Bind the selected value using the `selected` prop. + + + ### Label text aligned left diff --git a/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte b/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte new file mode 100644 index 00000000..ef014adb --- /dev/null +++ b/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte @@ -0,0 +1,36 @@ + + + + + + + + + + + + {#each ['free', 'standard', 'pro'] as value} + + {/each} + + +
+ Selected plan: + {plan} +