Skip to content

Commit

Permalink
docs(TextField): remove wrapper from stand
Browse files Browse the repository at this point in the history
closes #3790
  • Loading branch information
gizeasy committed Oct 28, 2024
1 parent d1f87de commit ba9c916
Showing 1 changed file with 22 additions and 35 deletions.
57 changes: 22 additions & 35 deletions src/components/TextFieldCanary/__stand__/TextField.variants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { IconPhoto } from '@consta/icons/IconPhoto';
import { useBoolean, useNumber, useSelect, useText } from '@consta/stand';
import React from 'react';

import { FieldWrapper } from '##/components/FieldComponents';
import {
fieldPropForm,
fieldPropFormDefault,
Expand Down Expand Up @@ -98,41 +97,29 @@ const Variants = () => {
const rightSide = rightSideType && rightSideSelect[rightSideType];

return (
<FieldWrapper
<TextField
id="inputId"
form={form}
status={status}
size={size}
view={view}
disabled={disabled}
style={{ width: '100%' }}
label="Заголовок"
required
labelIcon={IconPhoto}
size="m"
side="md"
caption="Подпись подпись"
counter={[10, 100]}
labelHtmlFor="inputId"
>
<TextField
id="inputId"
form={form}
status={status}
size={size}
view={view}
disabled={disabled}
style={{ display: 'block' }}
leftSide={leftSide}
rightSide={rightSide}
maxLength={maxLength}
withClearButton={withClearButton}
placeholder={placeholder}
type={type}
incrementButtons={type === 'number' ? incrementButtons : undefined}
min={type === 'number' ? min : undefined}
max={type === 'number' ? max : undefined}
step={getStep(type, withStepArray, step)}
resize={type === 'textarea' ? resizeMap[resize] : undefined}
maxRows={type === 'textarea' && resize === 'auto' ? maxRows : undefined}
minRows={type === 'textarea' && resize === 'auto' ? minRows : undefined}
rows={type === 'textarea' && resize !== 'auto' ? rows : undefined}
/>
</FieldWrapper>
leftSide={leftSide}
rightSide={rightSide}
maxLength={maxLength}
withClearButton={withClearButton}
placeholder={placeholder}
type={type}
incrementButtons={type === 'number' ? incrementButtons : undefined}
min={type === 'number' ? min : undefined}
max={type === 'number' ? max : undefined}
step={getStep(type, withStepArray, step)}
resize={type === 'textarea' ? resizeMap[resize] : undefined}
maxRows={type === 'textarea' && resize === 'auto' ? maxRows : undefined}
minRows={type === 'textarea' && resize === 'auto' ? minRows : undefined}
rows={type === 'textarea' && resize !== 'auto' ? rows : undefined}
/>
);
};

Expand Down

0 comments on commit ba9c916

Please sign in to comment.