Skip to content

Commit 2144cdc

Browse files
committed
run prettier
1 parent ec8bfda commit 2144cdc

28 files changed

+174
-80
lines changed

src/ActionList/Description.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ export type ActionListDescriptionProps = {
1414
variant?: 'inline' | 'block'
1515
} & SxProp
1616

17-
export const Description: React.FC<React.PropsWithChildren<ActionListDescriptionProps>> = ({variant = 'inline', sx = {}, ...props}) => {
17+
export const Description: React.FC<React.PropsWithChildren<ActionListDescriptionProps>> = ({
18+
variant = 'inline',
19+
sx = {},
20+
...props
21+
}) => {
1822
const styles = {
1923
fontSize: 0,
2024
lineHeight: '16px',

src/Dialog/Dialog.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,13 @@ const StyledDialog = styled.div<StyledDialogProps>`
213213
${sx};
214214
`
215215

216-
const DefaultHeader: React.FC<React.PropsWithChildren<DialogHeaderProps>> = ({dialogLabelId, title, subtitle, dialogDescriptionId, onClose}) => {
216+
const DefaultHeader: React.FC<React.PropsWithChildren<DialogHeaderProps>> = ({
217+
dialogLabelId,
218+
title,
219+
subtitle,
220+
dialogDescriptionId,
221+
onClose
222+
}) => {
217223
const onCloseClick = useCallback(() => {
218224
onClose('close-button')
219225
}, [onClose])

src/FormControl/_FormControlValidation.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ export type FormControlValidationProps = {
1010
id?: string
1111
} & SxProp
1212

13-
const FormControlValidation: React.FC<React.PropsWithChildren<FormControlValidationProps>> = ({children, variant, sx, id}) => (
13+
const FormControlValidation: React.FC<React.PropsWithChildren<FormControlValidationProps>> = ({
14+
children,
15+
variant,
16+
sx,
17+
id
18+
}) => (
1419
<Slot name="Validation">
1520
{({validationMessageId}: FormControlContext) => (
1621
<InputValidation validationStatus={variant} id={id || validationMessageId} sx={sx}>

src/PageLayout/PageLayout.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ function negateSpacingValue(value: number | null | Array<number | null>) {
111111
return value === null ? null : -value
112112
}
113113

114-
const HorizontalDivider: React.FC<React.PropsWithChildren<DividerProps>> = ({variant = 'none', variantWhenNarrow = 'inherit', sx = {}}) => {
114+
const HorizontalDivider: React.FC<React.PropsWithChildren<DividerProps>> = ({
115+
variant = 'none',
116+
variantWhenNarrow = 'inherit',
117+
sx = {}
118+
}) => {
115119
const {padding} = React.useContext(PageLayoutContext)
116120
return (
117121
<Box
@@ -153,7 +157,11 @@ const verticalDividerVariants = {
153157
}
154158
}
155159

156-
const VerticalDivider: React.FC<React.PropsWithChildren<DividerProps>> = ({variant = 'none', variantWhenNarrow = 'inherit', sx = {}}) => {
160+
const VerticalDivider: React.FC<React.PropsWithChildren<DividerProps>> = ({
161+
variant = 'none',
162+
variantWhenNarrow = 'inherit',
163+
sx = {}
164+
}) => {
157165
return (
158166
<Box
159167
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -232,7 +240,12 @@ const contentWidths = {
232240
xlarge: '1280px'
233241
}
234242

235-
const Content: React.FC<React.PropsWithChildren<PageLayoutContentProps>> = ({width = 'full', hidden = false, children, sx = {}}) => {
243+
const Content: React.FC<React.PropsWithChildren<PageLayoutContentProps>> = ({
244+
width = 'full',
245+
hidden = false,
246+
children,
247+
sx = {}
248+
}) => {
236249
const isHidden = useResponsiveValue(hidden, false)
237250
return (
238251
<Box

src/Placeholder.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import {Box} from '.'
22
import React from 'react'
33

44
/** Private component used to render placeholders in storybook and documentation examples */
5-
export const Placeholder: React.FC<React.PropsWithChildren<{
6-
width?: number | string
7-
height: number | string
8-
label?: string
9-
}>> = ({width, height, label}) => {
5+
export const Placeholder: React.FC<
6+
React.PropsWithChildren<{
7+
width?: number | string
8+
height: number | string
9+
label?: string
10+
}>
11+
> = ({width, height, label}) => {
1012
return (
1113
<Box
1214
sx={{

src/Portal/Portal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ export interface PortalProps {
6060
* Creates a React Portal, placing all children in a separate physical DOM root node.
6161
* @see https://reactjs.org/docs/portals.html
6262
*/
63-
export const Portal: React.FC<React.PropsWithChildren<PortalProps>> = ({children, onMount, containerName: _containerName}) => {
63+
export const Portal: React.FC<React.PropsWithChildren<PortalProps>> = ({
64+
children,
65+
onMount,
66+
containerName: _containerName
67+
}) => {
6468
const hostElement = document.createElement('div')
6569

6670
// Portaled content should get their own stacking context so they don't interfere

src/Select.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,13 @@ const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
101101
)
102102
)
103103

104-
const Option: React.FC<React.PropsWithChildren<React.HTMLProps<HTMLOptionElement> & {value: string}>> = props => <option {...props} />
104+
const Option: React.FC<React.PropsWithChildren<React.HTMLProps<HTMLOptionElement> & {value: string}>> = props => (
105+
<option {...props} />
106+
)
105107

106-
const OptGroup: React.FC<React.PropsWithChildren<React.HTMLProps<HTMLOptGroupElement>>> = props => <optgroup {...props} />
108+
const OptGroup: React.FC<React.PropsWithChildren<React.HTMLProps<HTMLOptGroupElement>>> = props => (
109+
<optgroup {...props} />
110+
)
107111

108112
export default Object.assign(Select, {
109113
Option,

src/TextInputWithTokens.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export type TextInputWithTokensProps<TokenComponentType extends AnyReactComponen
2323
/**
2424
* The array of tokens to render
2525
*/
26-
tokens: TokenComponentType extends React.ComponentType<React.PropsWithChildren<infer TokenProps>> ? TokenProps[] : never
26+
tokens: TokenComponentType extends React.ComponentType<React.PropsWithChildren<infer TokenProps>>
27+
? TokenProps[]
28+
: never
2729
/**
2830
* The function that gets called when a token is removed
2931
*/

src/_CheckboxOrRadioGroup/_CheckboxOrRadioGroupLabel.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ export type CheckboxOrRadioGroupLabelProps = {
1212
visuallyHidden?: boolean
1313
} & SxProp
1414

15-
const CheckboxOrRadioGroupLabel: React.FC<React.PropsWithChildren<CheckboxOrRadioGroupLabelProps>> = ({children, visuallyHidden, sx}) => (
15+
const CheckboxOrRadioGroupLabel: React.FC<React.PropsWithChildren<CheckboxOrRadioGroupLabelProps>> = ({
16+
children,
17+
visuallyHidden,
18+
sx
19+
}) => (
1620
<Slot name="Label">
1721
{({required, disabled}: CheckboxOrRadioGroupContext) => (
1822
<VisuallyHidden

src/_CheckboxOrRadioGroup/_CheckboxOrRadioGroupValidation.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ export type CheckboxOrRadioGroupValidationProps = {
1010
variant: FormValidationStatus
1111
} & SxProp
1212

13-
const CheckboxOrRadioGroupValidation: React.FC<React.PropsWithChildren<CheckboxOrRadioGroupValidationProps>> = ({children, variant, sx}) => (
13+
const CheckboxOrRadioGroupValidation: React.FC<React.PropsWithChildren<CheckboxOrRadioGroupValidationProps>> = ({
14+
children,
15+
variant,
16+
sx
17+
}) => (
1418
<Slot name="Validation">
1519
{({validationMessageId = ''}: CheckboxOrRadioGroupContext) => (
1620
<InputValidation validationStatus={variant} id={validationMessageId} sx={sx}>

0 commit comments

Comments
 (0)