Update radio samples

pull/5806/head
Cagatay Civici 2024-05-30 02:18:47 +03:00
parent 35cff68607
commit a05ce64d72
3 changed files with 22 additions and 13 deletions

View File

@ -30,7 +30,6 @@ export default {
<RadioButton v-model="selectedCategory" :inputId="category.key" name="dynamic" :value="category.name" /> <RadioButton v-model="selectedCategory" :inputId="category.key" name="dynamic" :value="category.name" />
<label :for="category.key" class="ml-2">{{ category.name }}</label> <label :for="category.key" class="ml-2">{{ category.name }}</label>
</div> </div>
`, `,
options: ` options: `
<template> <template>

View File

@ -3,7 +3,7 @@
<p>Specify the <i>variant</i> property as <i>filled</i> to display the component with a higher visual emphasis than the default <i>outlined</i> style.</p> <p>Specify the <i>variant</i> property as <i>filled</i> to display the component with a higher visual emphasis than the default <i>outlined</i> style.</p>
</DocSectionText> </DocSectionText>
<div class="card flex justify-center"> <div class="card flex justify-center">
<RadioButton v-model="checked" variant="filled" binary /> <RadioButton v-model="value" value="1" variant="filled" />
</div> </div>
<DocSectionCode :code="code" /> <DocSectionCode :code="code" />
</template> </template>
@ -12,15 +12,15 @@
export default { export default {
data() { data() {
return { return {
checked: false, value: null,
code: { code: {
basic: ` basic: `
<RadioButton v-model="checked" variant="filled" binary /> <RadioButton v-model="value" value="1" variant="filled" />
`, `,
options: ` options: `
<template> <template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<RadioButton v-model="checked" variant="filled" binary /> <RadioButton v-model="value" value="1" variant="filled" />
</div> </div>
</template> </template>
@ -28,7 +28,7 @@ export default {
export default { export default {
data() { data() {
return { return {
checked: true value: null
} }
} }
} }
@ -37,14 +37,14 @@ export default {
composition: ` composition: `
<template> <template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<RadioButton v-model="checked" variant="filled" binary /> <RadioButton v-model="value" value="1" variant="filled" />
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
const checked = ref(false); const value = ref(null);
<\/script> <\/script>
` `
} }

View File

@ -3,7 +3,7 @@
<p>Invalid state is displayed using the <i>invalid</i> prop to indicate a failed validation. You can use this style when integrating with form validation libraries.</p> <p>Invalid state is displayed using the <i>invalid</i> prop to indicate a failed validation. You can use this style when integrating with form validation libraries.</p>
</DocSectionText> </DocSectionText>
<div class="card flex justify-center"> <div class="card flex justify-center">
<RadioButton invalid binary /> <RadioButton v-model="value" value="1" :invalid="value === null" />
</div> </div>
<DocSectionCode :code="code" /> <DocSectionCode :code="code" />
</template> </template>
@ -12,29 +12,39 @@
export default { export default {
data() { data() {
return { return {
checked: false, value: null,
code: { code: {
basic: ` basic: `
<RadioButton invalid binary /> <RadioButton v-model="value" value="1" :invalid="value === null" />
`, `,
options: ` options: `
<template> <template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<RadioButton invalid binary /> <RadioButton v-model="value" value="1" :invalid="value === null" />
</div> </div>
</template> </template>
<script> <script>
export default {
data() {
return {
val: null
}
}
};
<\/script> <\/script>
`, `,
composition: ` composition: `
<template> <template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<RadioButton invalid binary /> <RadioButton v-model="value" value="1" :invalid="value === null" />
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue';
const val = ref(null);
<\/script> <\/script>
` `
} }