`,
components: { VHomeLink },
setup() {
- args.bg = args.variant === "dark" ? "bg-white" : "bg-black"
- return { args }
+ const bg = args.variant === "dark" ? "bg-white" : "bg-black"
+ return { args, bg }
},
})
diff --git a/frontend/src/components/VHomeGallery/meta/VHomeGallery.stories.mdx b/frontend/src/components/VHomeGallery/meta/VHomeGallery.stories.mdx
index ddf06d64e7c..1d205dddbd7 100644
--- a/frontend/src/components/VHomeGallery/meta/VHomeGallery.stories.mdx
+++ b/frontend/src/components/VHomeGallery/meta/VHomeGallery.stories.mdx
@@ -6,18 +6,20 @@ import {
Story,
} from "@storybook/addon-docs"
-import VHomeGallery from "@/components/VHomeGallery/VHomeGallery.vue"
+import VHomeGallery from "~/components/VHomeGallery/VHomeGallery.vue"
export const Template = (args) => ({
diff --git a/frontend/src/components/VIcon/meta/VIcon.stories.mdx b/frontend/src/components/VIcon/meta/VIcon.stories.mdx
index 8b889bb2933..c4988269186 100644
--- a/frontend/src/components/VIcon/meta/VIcon.stories.mdx
+++ b/frontend/src/components/VIcon/meta/VIcon.stories.mdx
@@ -49,9 +49,11 @@ To display the icon, pass the name of the icon as a prop.
name: {
options: iconNames,
control: { type: "select" },
- defaultValue: "replay",
},
}}
+ args={{
+ name: "replay",
+ }}
>
{Template.bind({})}
diff --git a/frontend/src/components/VInputField/VInputField.vue b/frontend/src/components/VInputField/VInputField.vue
index 8f92db5b70d..de9519491d6 100644
--- a/frontend/src/components/VInputField/VInputField.vue
+++ b/frontend/src/components/VInputField/VInputField.vue
@@ -59,11 +59,12 @@ export default defineComponent({
},
/**
* the textual content of the label associated with this input field; This
- * label is SR-only.
+ * label is SR-only. If you want to display a visible label, add
+ * `for="fieldId"` to the label element and set the `fieldId` prop to the
+ * same value as the `for` attribute.
*/
labelText: {
type: String,
- required: true,
},
/**
* the ID to assign to the field; This can be used to attach custom labels
diff --git a/frontend/src/components/VInputField/meta/VInputField.stories.mdx b/frontend/src/components/VInputField/meta/VInputField.stories.mdx
index 3af57987a11..536ea21f52f 100644
--- a/frontend/src/components/VInputField/meta/VInputField.stories.mdx
+++ b/frontend/src/components/VInputField/meta/VInputField.stories.mdx
@@ -16,11 +16,16 @@ import VInputField from "~/components/VInputField/VInputField.vue"
action: "update:modelValue",
},
}}
+ args={{
+ fieldId: "input",
+ labelText: "Test label",
+ size: "medium",
+ }}
/>
export const Template = (args) => ({
template: `
-
+
Extra info
`,
@@ -55,7 +60,7 @@ The recommended way to use it is with `v-model` mapping to a `String`.
export const vModelTemplate = () => ({
template: `
-
+
{{ text.length }}
{{ text }}
@@ -104,7 +109,7 @@ via the `labelText` prop.
To provide a custom label, skip the `labelText` prop (to remove the SR-only
-label) and set the `id` attribute on the component (which is passed to the
+label) and set the `field-id` attribute on the component (which is passed to the
`` element). Now use the ID as the `for` attribute of your custom
`