Skip to content

Commit ad72fa9

Browse files
committed
style: run foramtter
1 parent 7e66e92 commit ad72fa9

File tree

14 files changed

+89
-84
lines changed

14 files changed

+89
-84
lines changed

src/components/Checkbox/Checkbox.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ export const Checkbox = forwardRef<
4848
ElementRef<typeof StyledRoot>,
4949
CheckboxProps
5050
>(({ label, ...props }, forwardedRef) => {
51-
const [id, { state, disabled, required }, remainingProps] = useFormControl(
52-
props
53-
)
51+
const [id, { state, disabled, required }, remainingProps] =
52+
useFormControl(props)
5453
return (
5554
<ConditionalWrapper
5655
condition={label}

src/components/Chip/Chip.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ const StyledChip = styled(DEFAULT_TAG, {
165165
transition: 'background 0s',
166166
},
167167
},
168-
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': {
169-
backgroundColor: '$$active',
170-
},
168+
'&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]':
169+
{
170+
backgroundColor: '$$active',
171+
},
171172
},
172173
},
173174
},

src/components/FormControl/FormControlContext.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ export const DEFAULT_FORM_STATE: FormControlState = {
4141
state: undefined,
4242
}
4343

44-
export const FormControlContext = createContext<
45-
[FormControlState, Dispatch<SetStateAction<FormControlState>>] | undefined
46-
>(undefined)
44+
export const FormControlContext =
45+
createContext<
46+
[FormControlState, Dispatch<SetStateAction<FormControlState>>] | undefined
47+
>(undefined)
4748
FormControlContext.displayName = 'FormControlContext'
4849

4950
if (process.env.NODE_ENV !== 'production') {

src/components/Input/Input.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ type InputProps = StyledInputProps &
4444

4545
export const Input = forwardRef<ElementRef<typeof DEFAULT_TAG>, InputProps>(
4646
({ label, onValueChange, ...props }, forwardedRef) => {
47-
const [id, { state, disabled, required }, remainingProps] = useFormControl(
48-
props
49-
)
47+
const [id, { state, disabled, required }, remainingProps] =
48+
useFormControl(props)
5049
return (
5150
<ConditionalWrapper
5251
condition={label}

src/components/Link/Link.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ const InternalLink: React.FC<InternalLinkProps> = forwardRef(
3939
*
4040
* Used inside `Link` but can be used separately to create custom links.
4141
* */
42-
export function linkProps(
43-
href: string | undefined
44-
): {
42+
export function linkProps(href: string | undefined): {
4543
href: string | undefined
4644
target?: string
4745
rel?: string

src/components/List/List.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ export const ListItem = forwardRef<unknown, ListItemProps>(
9292
return (
9393
<StyledInteractiveListItem
9494
{...buttonProps}
95-
ref={(forwardedRef as unknown) as ForwardedRef<HTMLButtonElement>}
95+
ref={forwardedRef as unknown as ForwardedRef<HTMLButtonElement>}
9696
/>
9797
)
9898
} else {
9999
const divProps = props as UninteractiveProps
100100
return (
101101
<StyledListItem
102102
{...divProps}
103-
ref={(forwardedRef as unknown) as ForwardedRef<HTMLDivElement>}
103+
ref={forwardedRef as unknown as ForwardedRef<HTMLDivElement>}
104104
/>
105105
)
106106
}

src/components/Select/Select.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,8 @@ export const Select = forwardRef<ElementRef<typeof Root>, SelectProps>(
170170
},
171171
forwardedRef
172172
) => {
173-
const [id, { state, disabled, required }, remainingProps] = useFormControl(
174-
props
175-
)
173+
const [id, { state, disabled, required }, remainingProps] =
174+
useFormControl(props)
176175
return (
177176
<ConditionalWrapper
178177
condition={label}

src/components/Svg/Svg.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Default } from './Svg.stories'
44

55
it('renders light without error', () => {
66
const { asFragment } = renderLight(
7-
Default({}, ({ globals: { portalled: true } } as unknown) as StoryContext<
7+
Default({}, { globals: { portalled: true } } as unknown as StoryContext<
88
ReactFramework,
99
Args
1010
>)
@@ -14,7 +14,7 @@ it('renders light without error', () => {
1414

1515
it('renders dark without error', () => {
1616
const { asFragment } = renderDark(
17-
Default({}, ({ globals: { portalled: true } } as unknown) as StoryContext<
17+
Default({}, { globals: { portalled: true } } as unknown as StoryContext<
1818
ReactFramework,
1919
Args
2020
>)

src/components/Table/Table.tsx

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ export const Table = styled(DEFAULT_TAG, {
9797
[`& th`]: {
9898
fontWeight: '$bold',
9999
},
100-
[`& thead td,& thead th,& ${TableHead} td,& ${TableHead} th,& ${TableHead} ${TableCell}`]: {
101-
fontWeight: '$regular',
102-
},
103-
[`& tfoot td,& tfoot th,& ${TableFoot} td,& ${TableFoot} th,& ${TableFoot} ${TableCell}`]: {},
100+
[`& thead td,& thead th,& ${TableHead} td,& ${TableHead} th,& ${TableHead} ${TableCell}`]:
101+
{
102+
fontWeight: '$regular',
103+
},
104+
[`& tfoot td,& tfoot th,& ${TableFoot} td,& ${TableFoot} th,& ${TableFoot} ${TableCell}`]:
105+
{},
104106

105107
[`& thead,& ${TableHead}`]: {
106108
backgroundColor: '$grey2',
@@ -110,26 +112,32 @@ export const Table = styled(DEFAULT_TAG, {
110112
variants: {
111113
hover: {
112114
row: {
113-
[`& tbody tr:hover,& tbody ${TableRow}:hover,& ${TableBody} tr:hover,& ${TableBody} ${TableRow}:hover`]: {
114-
backgroundColor: '$grey4',
115-
},
116-
[`& tbody tr[class*="selected"],& tbody ${TableRow}[class*="selected"],& ${TableBody} tr[class*="selected"],& ${TableBody} ${TableRow}[class*="selected"]`]: {
117-
backgroundColor: '$selection',
118-
},
119-
[`& tbody td[class*="selected"],& tbody ${TableCell}[class*="selected"],& ${TableBody} td[class*="selected"],& ${TableBody} ${TableCell}[class*="selected"]`]: {
120-
backgroundColor: '$selection',
121-
},
115+
[`& tbody tr:hover,& tbody ${TableRow}:hover,& ${TableBody} tr:hover,& ${TableBody} ${TableRow}:hover`]:
116+
{
117+
backgroundColor: '$grey4',
118+
},
119+
[`& tbody tr[class*="selected"],& tbody ${TableRow}[class*="selected"],& ${TableBody} tr[class*="selected"],& ${TableBody} ${TableRow}[class*="selected"]`]:
120+
{
121+
backgroundColor: '$selection',
122+
},
123+
[`& tbody td[class*="selected"],& tbody ${TableCell}[class*="selected"],& ${TableBody} td[class*="selected"],& ${TableBody} ${TableCell}[class*="selected"]`]:
124+
{
125+
backgroundColor: '$selection',
126+
},
122127
},
123128
cell: {
124-
[`& tbody td:hover,& tbody ${TableCell}:hover,& ${TableBody} td:hover,& ${TableBody} ${TableCell}:hover`]: {
125-
backgroundColor: '$grey4',
126-
},
127-
[`& tbody td[class*="selected"],& tbody ${TableCell}[class*="selected"],& ${TableBody} td[class*="selected"],& ${TableBody} ${TableCell}[class*="selected"]`]: {
128-
backgroundColor: '$selection',
129-
},
130-
[`& tbody tr[class*="selected"],& tbody ${TableRow}[class*="selected"],& ${TableBody} tr[class*="selected"],& ${TableBody} ${TableRow}[class*="selected"]`]: {
131-
backgroundColor: '$selection',
132-
},
129+
[`& tbody td:hover,& tbody ${TableCell}:hover,& ${TableBody} td:hover,& ${TableBody} ${TableCell}:hover`]:
130+
{
131+
backgroundColor: '$grey4',
132+
},
133+
[`& tbody td[class*="selected"],& tbody ${TableCell}[class*="selected"],& ${TableBody} td[class*="selected"],& ${TableBody} ${TableCell}[class*="selected"]`]:
134+
{
135+
backgroundColor: '$selection',
136+
},
137+
[`& tbody tr[class*="selected"],& tbody ${TableRow}[class*="selected"],& ${TableBody} tr[class*="selected"],& ${TableBody} ${TableRow}[class*="selected"]`]:
138+
{
139+
backgroundColor: '$selection',
140+
},
133141
},
134142
},
135143
striped: {
@@ -144,11 +152,12 @@ export const Table = styled(DEFAULT_TAG, {
144152
true: {
145153
position: 'relative',
146154
borderCollapse: 'separate',
147-
[`& thead td,& thead th,& ${TableHead} td,& ${TableHead} th,& ${TableHead} ${TableCell}`]: {
148-
position: 'sticky',
149-
top: 0,
150-
zIndex: 2,
151-
},
155+
[`& thead td,& thead th,& ${TableHead} td,& ${TableHead} th,& ${TableHead} ${TableCell}`]:
156+
{
157+
position: 'sticky',
158+
top: 0,
159+
zIndex: 2,
160+
},
152161
[`& thead,& ${TableHead}`]: {
153162
position: 'sticky',
154163
top: 0,

src/components/TextArea/TextArea.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ export const TextArea = forwardRef<
5757
ElementRef<typeof DEFAULT_TAG>,
5858
TextAreaProps
5959
>(({ label, onValueChange, ...props }, forwardedRef) => {
60-
const [id, { state, disabled, required }, remainingProps] = useFormControl(
61-
props
62-
)
60+
const [id, { state, disabled, required }, remainingProps] =
61+
useFormControl(props)
6362
return (
6463
<>
6564
{label && (

0 commit comments

Comments
 (0)