Skip to content

Commit

Permalink
WIP: FieldPassword component
Browse files Browse the repository at this point in the history
  • Loading branch information
ewhanson committed Jul 29, 2024
1 parent 2123b86 commit 7621b23
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/Form/fields/FieldPassword.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {Primary, Controls, Stories, Meta} from '@storybook/blocks';

import * as FieldPasswordStories from './FieldPassword.stories.js';

<Meta of={FieldPasswordStories} />

# FieldPassword

## Usage

TODO: Usage text to go here

<Primary />
<Controls />
<Stories />
37 changes: 37 additions & 0 deletions src/components/Form/fields/FieldPassword.stories.js
Original file line number Diff line number Diff line change
@@ -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: `
<FieldText v-bind="args" @change="change" />
`,
}),
};

export const Base = {
args: {
...FieldBaseMock,
name: 'access-secret',
component: 'field-text',
inputType: 'text',
label: 'Access Secret',
isRequired: true,
value: '',
},
};
11 changes: 11 additions & 0 deletions src/components/Form/fields/FieldPassword.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script>
export default {
name: 'FieldPassword',
};
</script>

<template>
<div></div>
</template>

<style scoped lang="less"></style>

0 comments on commit 7621b23

Please sign in to comment.