From 7621b237a8ac8c06b8a9491dcaca83b83b916e46 Mon Sep 17 00:00:00 2001 From: Erik Hanson Date: Mon, 29 Jul 2024 08:08:05 -0700 Subject: [PATCH] WIP: FieldPassword component --- src/components/Form/fields/FieldPassword.mdx | 15 ++++++++ .../Form/fields/FieldPassword.stories.js | 37 +++++++++++++++++++ src/components/Form/fields/FieldPassword.vue | 11 ++++++ 3 files changed, 63 insertions(+) create mode 100644 src/components/Form/fields/FieldPassword.mdx create mode 100644 src/components/Form/fields/FieldPassword.stories.js create mode 100644 src/components/Form/fields/FieldPassword.vue diff --git a/src/components/Form/fields/FieldPassword.mdx b/src/components/Form/fields/FieldPassword.mdx new file mode 100644 index 000000000..8d7a338ed --- /dev/null +++ b/src/components/Form/fields/FieldPassword.mdx @@ -0,0 +1,15 @@ +import {Primary, Controls, Stories, Meta} from '@storybook/blocks'; + +import * as FieldPasswordStories from './FieldPassword.stories.js'; + + + +# FieldPassword + +## Usage + +TODO: Usage text to go here + + + + diff --git a/src/components/Form/fields/FieldPassword.stories.js b/src/components/Form/fields/FieldPassword.stories.js new file mode 100644 index 000000000..979c6a294 --- /dev/null +++ b/src/components/Form/fields/FieldPassword.stories.js @@ -0,0 +1,37 @@ +import FieldText from '@/components/Form/fields/FieldText.vue'; + +import FieldBaseMock from '@/components/Form/mocks/field-base'; + +export default { + title: 'Forms/FieldPassword', + component: FieldText, + render: (args) => ({ + components: {FieldText}, + setup() { + function change(name, prop, newValue, localeKey) { + if (localeKey) { + args[prop][localeKey] = newValue; + } else { + args[prop] = newValue; + } + } + + return {args, change}; + }, + template: ` + + `, + }), +}; + +export const Base = { + args: { + ...FieldBaseMock, + name: 'access-secret', + component: 'field-text', + inputType: 'text', + label: 'Access Secret', + isRequired: true, + value: '', + }, +}; diff --git a/src/components/Form/fields/FieldPassword.vue b/src/components/Form/fields/FieldPassword.vue new file mode 100644 index 000000000..13bebdcd8 --- /dev/null +++ b/src/components/Form/fields/FieldPassword.vue @@ -0,0 +1,11 @@ + + + + +