Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Input/InputTextBase/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface InputTextBaseProps extends Omit<
* Можно передать число. Если переданное число меньше размера base, будет использован размер base.
* @default 'base'
*/
size?: 'base' | 'large' | 'xlarge' | number
size?: 'base' | 'medium' | 'large' | 'xlarge' | number
}

export type RenderTextInputArgs = TextInputProps & { inputRef: Ref<TextInput> }
1 change: 1 addition & 0 deletions src/components/Input/InputTextBase/useInputStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const useInputContainerMinHeight = (

const containerMinHeight = StyleSheet.create(({ theme }) => ({
base: { minHeight: theme.InputSize.base['min-height'] },
medium: { minHeight: theme.InputSize.medium['min-height'] },
large: { minHeight: theme.InputSize.large['min-height'] },
xlarge: { minHeight: theme.InputSize.xlarge['min-height'] },
}))
Expand Down
2 changes: 1 addition & 1 deletion src/components/Input/stories/InputGroup.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const meta: Meta<typeof InputGroup> = {
},
argTypes: {
state: { control: 'radio', options: ['default', 'danger'] },
size: { control: 'radio', options: ['base', 'large', 'xlarge'] },
size: { control: 'radio', options: ['base', 'medium', 'large', 'xlarge'] },
},
render: (args) => {
const [, updateArgs] = useArgs()
Expand Down
2 changes: 1 addition & 1 deletion src/components/Input/stories/InputText.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const meta: Meta<typeof InputText & typeof InputTextBase> = {
options: ['true', 'false', 'toggleable'],
mapping: { true: true, false: false, toggleable: 'toggleable' },
},
size: { control: 'radio', options: ['base', 'large', 'xlarge'] },
size: { control: 'radio', options: ['base', 'medium', 'large', 'xlarge'] },
},
render: (args) => {
const [, updateArgs] = useArgs()
Expand Down
3 changes: 2 additions & 1 deletion src/theme/assets/InputSize/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import base from './base.json'
import large from './large.json'
import medium from './medium.json'
import xlarge from './xlarge.json'

export const InputSize = { base, large, xlarge }
export const InputSize = { base, medium, large, xlarge }
1 change: 1 addition & 0 deletions src/theme/assets/InputSize/medium.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "min-height": 42 }
Loading