Skip to content

Commit cf993b1

Browse files
eslookCharlotte Gieltjes
andauthored
docs: generate missing bits of text input for docs react and css (#819)
Co-authored-by: Charlotte Gieltjes <charlotte.gieltjes@rebels.io>
1 parent f89b995 commit cf993b1

File tree

8 files changed

+74
-4
lines changed

8 files changed

+74
-4
lines changed

.changeset/eighty-aliens-lose.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/components-react/text-input-react/src/text-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { ReactNode, HTMLAttributes } from 'react';
22
import { clsx } from 'clsx';
33
import { forwardRef } from 'react';
44

5-
export interface TextInputProps extends HTMLAttributes<HTMLElement> {
5+
export interface TextInputProps extends HTMLAttributes<HTMLDivElement> {
66
children: ReactNode; // Needed in template file, feel free to remove
77
}
88

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Biedt de mogelijkheid om één regel aan tekens in te vullen.

packages/docs/text-input-docs/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"text-input-component"
1212
],
1313
"files": [
14-
"./docs/"
14+
"./docs/",
15+
"./stories/"
1516
],
1617
"repository": {
1718
"type": "git+ssh",
@@ -22,5 +23,11 @@
2223
"publishConfig": {
2324
"access": "public",
2425
"provenance": true
26+
},
27+
"devDependencies": {
28+
"@nl-design-system-candidate/text-input-react": "workspace:*",
29+
"@storybook/react-vite": "9.1.5",
30+
"@types/react": "19.2.7",
31+
"react": "19.2.3"
2532
}
2633
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { Meta } from '@storybook/react-vite';
2+
import { TextInput } from '@nl-design-system-candidate/text-input-react/css';
3+
4+
const CLASSES = 'classes';
5+
6+
const meta = {
7+
argTypes: {
8+
nlTextInput: {
9+
name: 'nl-text-input',
10+
description: 'De basis class van dit component',
11+
control: false,
12+
type: { name: 'other', value: 'string', required: true },
13+
table: {
14+
category: CLASSES,
15+
type: { summary: undefined },
16+
},
17+
},
18+
children: {
19+
table: { disable: true },
20+
},
21+
},
22+
component: (props) => <TextInput {...props} />,
23+
} satisfies Meta;
24+
25+
export default meta;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { Meta } from '@storybook/react-vite';
2+
import { TextInput } from '@nl-design-system-candidate/text-input-react/css';
3+
4+
const meta = {
5+
argTypes: {
6+
children: { control: 'text', table: { category: 'API' } },
7+
},
8+
component: TextInput,
9+
} satisfies Meta<typeof TextInput>;
10+
11+
export default meta;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { StoryObj } from '@storybook/react-vite';
2+
import type { TextInputProps } from '@nl-design-system-candidate/text-input-react';
3+
4+
type Story = StoryObj<TextInputProps>;
5+
6+
export const TextInput: Story = {
7+
name: 'Text Input',
8+
args: {
9+
children: `Text Input`,
10+
},
11+
};

pnpm-lock.yaml

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)