Skip to content

Commit 1f572b5

Browse files
committed
docs: Document Input component
1 parent ec5313b commit 1f572b5

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: 'Input'
3+
description: 'A flexible input component.'
4+
---
5+
6+
import TypeDoc from '@docs/solid/components/control/input.md';
7+
import { BaseColor, ControlSize, InputType } from '@packages/browser-utils';
8+
import { Interactive } from '@src/components/interactive';
9+
10+
<Interactive
11+
componentName="Input"
12+
argDefinitions={{
13+
label: {
14+
type: 'string',
15+
options: ["Username", "Email", "Password"]
16+
},
17+
type: {
18+
type: 'string',
19+
options: Object.values(InputType),
20+
default: "text"
21+
},
22+
variant: {
23+
type: 'string',
24+
options: ['contained', 'outlined'],
25+
default: "contained"
26+
},
27+
icon: {
28+
type: 'string',
29+
options: ['mdi:star', 'mdi:check', 'mdi:login'],
30+
},
31+
size: {
32+
type: 'string',
33+
options: Object.values(ControlSize),
34+
},
35+
required: {
36+
type: 'boolean',
37+
},
38+
disabled: {
39+
type: 'boolean',
40+
},
41+
}}
42+
>
43+
Click me!
44+
</Interactive>
45+
46+
<TypeDoc />

packages/solid/src/components/control/input/input.component.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import { attributes, classNames } from '@src/main';
44
import { Icon } from '@iconify-icon/solid';
55
import { InputType } from '@spuxx/browser-utils';
66

7+
/**
8+
* A flexible input component.
9+
* @param props - {@link InputProps}
10+
* @returns The input component.
11+
*/
712
export const Input: Component<InputProps> = (props) => {
813
const {
914
type = InputType.text,

0 commit comments

Comments
 (0)