Skip to content

Commit

Permalink
feat(*): update docs for form
Browse files Browse the repository at this point in the history
  • Loading branch information
iljs committed Nov 12, 2024
1 parent a110e90 commit af2c988
Show file tree
Hide file tree
Showing 17 changed files with 165 additions and 7 deletions.
35 changes: 35 additions & 0 deletions scaffold/template-docs/docs/form/Components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,38 @@ sidebar_position: 4
]
```



### Combobox

#### React Hook Form

Изначальные значения задаются в defaultValue через параметр в компоненте. Возвращаемый и изначальный тип `string`.

#### Нативная форма

Изначальные значения задаются в defaultValue через параметр в компоненте. Возвращаемый и изначальный тип `string`.


### Combobox Multiple

#### React Hook Form

Изначальные значения задаются в defaultValue (`string[]`) через параметр в компоненте. Возвращаемый тип `string[]`.

#### Нативная форма

Изначальные значения задаются в defaultValue (`number[]`) через параметр в компоненте. Возвращается количество выбранных элементов с ключем `name` и значением `value`.
```
[
['textfield': 'test'],
...
['combobox': 'test_1'],
['combobox': 'test_2'],
...
['textfield2': 'test'],
]
```

3 changes: 2 additions & 1 deletion scaffold/template-docs/docs/form/NativeForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export function App() {
/>
))}
</RadioGroup>
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<DatePicker label="DatePicker" name="datepicker" />
<Combobox label="Combobox" name="combobox" />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
2 changes: 2 additions & 0 deletions scaffold/template-docs/docs/form/ReactHookForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export function App() {
</RadioGroup>
<Slider {...register('slider')} label="Slider" type="single" min={0} max={100} />
<Slider {...register('sliderdouble')} label="Slider Double" type="double" min={0} max={100} />
<Combobox {...register('combobox')} />
<Combobox {...register('comboboxMultiple')} />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
2 changes: 1 addition & 1 deletion website/plasma-b2c-docs/docs/form/NativeForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function App() {
/>
))}
</RadioGroup>
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<DatePicker label="DatePicker" name="datepicker" />
<Combobox label="Combobox" name="combobox" />
<Button type="submit">Отправить</Button>
Expand Down
35 changes: 35 additions & 0 deletions website/plasma-web-docs/docs/form/Components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,38 @@ sidebar_position: 4
]
```



### Combobox

#### React Hook Form

Изначальные значения задаются в defaultValue через параметр в компоненте. Возвращаемый и изначальный тип `string`.

#### Нативная форма

Изначальные значения задаются в defaultValue через параметр в компоненте. Возвращаемый и изначальный тип `string`.


### Combobox Multiple

#### React Hook Form

Изначальные значения задаются в defaultValue (`string[]`) через параметр в компоненте. Возвращаемый тип `string[]`.

#### Нативная форма

Изначальные значения задаются в defaultValue (`number[]`) через параметр в компоненте. Возвращается количество выбранных элементов с ключем `name` и значением `value`.
```
[
['textfield': 'test'],
...
['combobox': 'test_1'],
['combobox': 'test_2'],
...
['textfield2': 'test'],
]
```

3 changes: 2 additions & 1 deletion website/plasma-web-docs/docs/form/NativeForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export function App() {
/>
))}
</RadioGroup>
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<DatePicker label="DatePicker" name="datepicker" />
<Combobox label="Combobox" name="combobox" />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
2 changes: 2 additions & 0 deletions website/plasma-web-docs/docs/form/ReactHookForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export function App() {
</RadioGroup>
<Slider {...register('slider')} label="Slider" type="single" min={0} max={100} />
<Slider {...register('sliderdouble')} label="Slider Double" type="double" min={0} max={100} />
<Combobox {...register('combobox')} />
<Combobox {...register('comboboxMultiple')} />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
35 changes: 35 additions & 0 deletions website/sdds-cs-docs/docs/form/Components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,38 @@ sidebar_position: 4
]
```



### Combobox

#### React Hook Form

Изначальные значения задаются в defaultValue через параметр в компоненте. Возвращаемый и изначальный тип `string`.

#### Нативная форма

Изначальные значения задаются в defaultValue через параметр в компоненте. Возвращаемый и изначальный тип `string`.


### Combobox Multiple

#### React Hook Form

Изначальные значения задаются в defaultValue (`string[]`) через параметр в компоненте. Возвращаемый тип `string[]`.

#### Нативная форма

Изначальные значения задаются в defaultValue (`number[]`) через параметр в компоненте. Возвращается количество выбранных элементов с ключем `name` и значением `value`.
```
[
['textfield': 'test'],
...
['combobox': 'test_1'],
['combobox': 'test_2'],
...
['textfield2': 'test'],
]
```

3 changes: 2 additions & 1 deletion website/sdds-cs-docs/docs/form/NativeForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export function App() {
/>
))}
</RadioGroup>
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<DatePicker label="DatePicker" name="datepicker" />
<Combobox label="Combobox" name="combobox" />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
2 changes: 2 additions & 0 deletions website/sdds-cs-docs/docs/form/ReactHookForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export function App() {
</RadioGroup>
<Slider {...register('slider')} label="Slider" type="single" min={0} max={100} />
<Slider {...register('sliderdouble')} label="Slider Double" type="double" min={0} max={100} />
<Combobox {...register('combobox')} />
<Combobox {...register('comboboxMultiple')} />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
35 changes: 35 additions & 0 deletions website/sdds-dfa-docs/docs/form/Components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,38 @@ sidebar_position: 4
]
```



### Combobox

#### React Hook Form

Изначальные значения задаются в defaultValue через параметр в компоненте. Возвращаемый и изначальный тип `string`.

#### Нативная форма

Изначальные значения задаются в defaultValue через параметр в компоненте. Возвращаемый и изначальный тип `string`.


### Combobox Multiple

#### React Hook Form

Изначальные значения задаются в defaultValue (`string[]`) через параметр в компоненте. Возвращаемый тип `string[]`.

#### Нативная форма

Изначальные значения задаются в defaultValue (`number[]`) через параметр в компоненте. Возвращается количество выбранных элементов с ключем `name` и значением `value`.
```
[
['textfield': 'test'],
...
['combobox': 'test_1'],
['combobox': 'test_2'],
...
['textfield2': 'test'],
]
```

3 changes: 2 additions & 1 deletion website/sdds-dfa-docs/docs/form/NativeForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export function App() {
/>
))}
</RadioGroup>
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<DatePicker label="DatePicker" name="datepicker" />
<Combobox label="Combobox" name="combobox" />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
2 changes: 2 additions & 0 deletions website/sdds-dfa-docs/docs/form/ReactHookForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export function App() {
</RadioGroup>
<Slider {...register('slider')} label="Slider" type="single" min={0} max={100} />
<Slider {...register('sliderdouble')} label="Slider Double" type="double" min={0} max={100} />
<Combobox {...register('combobox')} />
<Combobox {...register('comboboxMultiple')} />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
3 changes: 2 additions & 1 deletion website/sdds-insol-docs/docs/form/NativeForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export function App() {
/>
))}
</RadioGroup>
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<DatePicker label="DatePicker" name="datepicker" />
<Combobox label="Combobox" name="combobox" />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
2 changes: 2 additions & 0 deletions website/sdds-insol-docs/docs/form/ReactHookForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export function App() {
</RadioGroup>
<Slider {...register('slider')} label="Slider" type="single" min={0} max={100} />
<Slider {...register('sliderdouble')} label="Slider Double" type="double" min={0} max={100} />
<Combobox {...register('combobox')} />
<Combobox {...register('comboboxMultiple')} />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
3 changes: 2 additions & 1 deletion website/sdds-serv-docs/docs/form/NativeForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export function App() {
/>
))}
</RadioGroup>
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<Slider name="slider" label="Slider" type="single" min={0} max={100} />
<DatePicker label="DatePicker" name="datepicker" />
<Combobox label="Combobox" name="combobox" />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down
2 changes: 2 additions & 0 deletions website/sdds-serv-docs/docs/form/ReactHookForm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export function App() {
</RadioGroup>
<Slider {...register('slider')} label="Slider" type="single" min={0} max={100} />
<Slider {...register('sliderdouble')} label="Slider Double" type="double" min={0} max={100} />
<Combobox {...register('combobox')} />
<Combobox {...register('comboboxMultiple')} />
<Button type="submit">Отправить</Button>
</form>
);
Expand Down

0 comments on commit af2c988

Please sign in to comment.