diff --git a/docs/src/pages/components/RadioButton.svx b/docs/src/pages/components/RadioButton.svx index aac4ea1d..dcde6c20 100644 --- a/docs/src/pages/components/RadioButton.svx +++ b/docs/src/pages/components/RadioButton.svx @@ -41,11 +41,11 @@ Use the named "legendText" slot to customize the legend text. -### Programmatic usage +### Reactive example -Bind the selected value using the `selected` prop. +Use the `selected` prop to bind and update the selected value. - + ### Left-aligned label text diff --git a/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte b/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte deleted file mode 100644 index ee361f5b..00000000 --- a/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - {#each ["free", "standard", "pro"] as value} - - {/each} - - -
- Selected plan: - {plan} -
diff --git a/docs/src/pages/framed/RadioButton/RadioButtonReactive.svelte b/docs/src/pages/framed/RadioButton/RadioButtonReactive.svelte new file mode 100644 index 00000000..9168d21f --- /dev/null +++ b/docs/src/pages/framed/RadioButton/RadioButtonReactive.svelte @@ -0,0 +1,32 @@ + + + + {#each plans as value} + + {/each} + + +
+ {#each plans as value} + + {/each} +
+ +Selected plan: +{plan}