Skip to content

Commit 8462916

Browse files
committed
docs(TextInput): Improve docs
1 parent f9344e5 commit 8462916

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/components/TextInput/TextInput.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ import * as TextInputStories from './TextInput.stories';
99
import TextInput from '@jackdomleo7/vue3-library/components/TextInput/TextInput.vue';
1010
```
1111

12+
<Story of={TextInputStories.TypeText} />
13+
1214
## `v-model`
1315

1416
You can bind any string value to the `v-model` prop. This is a two-way binding, so any changes to the input will update the bound value, and vice versa.
1517

1618
```ts
1719
import { ref } from 'vue';
1820

19-
const value = ref('');
21+
const value = ref<string>('');
2022
```
2123

2224
```html

src/components/TextInput/TextInput.stories.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ const meta: Meta<ComponentPropsAndSlots<typeof TextInput> & FallthroughAttrs> =
4545
export default meta;
4646
type Story = StoryObj<typeof meta>;
4747

48+
export const Default: Story = {
49+
args: {
50+
id: 'default',
51+
label: 'Label'
52+
}
53+
};
54+
4855
export const TypeText: Story = {
4956
args: {
5057
id: 'type-text',

0 commit comments

Comments
 (0)