Skip to content

Commit c7c16b0

Browse files
fix(ui): apply Mosaic reset to Input
1 parent 47eca0a commit c7c16b0

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

packages/ui/src/mosaic/components/input/input.styles.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ export const styles = stylex.create({
3535
':focus-visible:where([aria-invalid="true"])': 'none',
3636
},
3737
backgroundColor: colorVars['--cl-color-input'],
38-
boxSizing: 'border-box',
39-
color: 'inherit',
4038
display: 'block',
4139
fontFamily: fontFamilyVars['--cl-font-family-sans'],
4240
outlineOffset: '2px',

packages/ui/src/mosaic/components/input/input.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import React from 'react';
44

55
import type { MosaicComponentProps } from '../../props';
66
import { mergeStyleProps, themeProps } from '../../props';
7+
import { reset } from '../reset.styles';
78
import { sizes, styles } from './input.styles';
89

910
export interface InputProps extends Omit<MosaicComponentProps<'input'>, 'size'> {
@@ -22,7 +23,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(function Mos
2223
disabled,
2324
...mergeStyleProps(
2425
themeProps('input', { size, disabled }),
25-
stylex.props(styles.base, sizes[size], disabled && styles.disabled),
26+
stylex.props(reset.base, styles.base, sizes[size], disabled && styles.disabled),
2627
className,
2728
style,
2829
),

packages/ui/src/mosaic/components/reset.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Button } from './button';
99
import { Card } from './card';
1010
import { Heading } from './heading';
1111
import { Icon } from './icon';
12+
import { Input } from './input';
1213
import { Item } from './item';
1314
import { reset } from './reset.styles';
1415
import { Text } from './text';
@@ -50,6 +51,7 @@ const cases: Array<[string, React.ReactElement]> = [
5051
name='ellipsis'
5152
/>,
5253
],
54+
['Input', <Input key='input' />],
5355
['Item', <Item.Root key='item' />],
5456
['Item.Group', <Item.Group key='item-group' />],
5557
['Item.Separator', <Item.Separator key='item-separator' />],

0 commit comments

Comments
 (0)