Skip to content

Commit 232ea59

Browse files
committed
fix: tag input and text area size (#5798)
1 parent a4b0bd8 commit 232ea59

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed

.changeset/quick-chefs-remain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ultraviolet/ui": patch
3+
---
4+
5+
`TagInput` and `TextArea`: fix size

packages/ui/src/components/TagInput/styles.css.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,19 @@ export const tagInputContainer = recipe({
4848
padding: `calc(${theme.space[TAGINPUT_SIZE_PADDING.large]} - 1px) ${
4949
theme.space['2']
5050
}`,
51+
height: theme.sizing[600],
5152
},
5253
small: {
5354
padding: `calc(${theme.space[TAGINPUT_SIZE_PADDING.small]} - 1px) ${
5455
theme.space['1']
5556
}`,
57+
height: theme.sizing[400],
5658
},
5759
medium: {
5860
padding: `calc(${theme.space[TAGINPUT_SIZE_PADDING.medium]} - 1px) ${
5961
theme.space['2']
6062
}`,
63+
height: theme.sizing[500],
6164
},
6265
},
6366
},

packages/ui/src/components/TextArea/__stories__/Examples.stories.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { AlertCircleOutlineIcon } from '@ultraviolet/icons'
33
import { useState } from 'react'
44
import { Badge } from '../../Badge'
55
import { Stack } from '../../Stack'
6+
import { Text } from '../../Text'
7+
import { TextInput } from '../../TextInput'
68
import { Tooltip } from '../../Tooltip'
79
import { TextArea } from '..'
810

@@ -13,6 +15,16 @@ export const Examples: StoryFn<typeof TextArea> = () => {
1315

1416
return (
1517
<Stack gap={2}>
18+
<Text as="div" variant="body">
19+
Should be the same height as a TextInput when{' '}
20+
<Text as="span" variant="code">
21+
rows={1}
22+
</Text>
23+
</Text>
24+
<Stack direction="row">
25+
<TextArea label="textArea" onChange={setValue} rows={1} />
26+
<TextInput label="textInput" />
27+
</Stack>
1628
<TextArea
1729
label="Label"
1830
maxLength={200}

packages/ui/src/components/TextArea/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ export const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
197197
aria-invalid={!!error}
198198
aria-label={ariaLabel}
199199
autoFocus={autoFocus}
200-
className={textAreaStyle({ error: !!error, success: !!success })}
200+
className={textAreaStyle({
201+
error: !!error,
202+
success: !!success,
203+
})}
201204
data-testid={dataTestId}
202205
disabled={disabled}
203206
id={id ?? localId}

packages/ui/src/components/TextArea/styles.css.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const textAreaClearableContainer = style({
1818
export const textArea = recipe({
1919
base: {
2020
width: '100%',
21+
minHeight: theme.sizing[600],
2122
resize: 'vertical',
2223
background: theme.colors.neutral.background,
2324
border: `1px solid ${theme.colors.neutral.border}`,

0 commit comments

Comments
 (0)