Skip to content

Commit

Permalink
Reformat to fix union types
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Sep 18, 2023
1 parent 6fdb2a9 commit 9fb33d6
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/circular-option-picker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type FullListboxCircularOptionPickerProps = CommonCircularOptionPickerProps & {
'aria-label'?: never;
'aria-labelledby': string;
}
);
);

export type ListboxCircularOptionPickerProps = WithBaseId &
Omit< FullListboxCircularOptionPickerProps, 'asButtons' >;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/color-palette/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ export type ColorPaletteProps = Pick< PaletteProps, 'onChange' > & {
'aria-labelledby'?: string;
'aria-label'?: never;
}
);
);
2 changes: 1 addition & 1 deletion packages/components/src/duotone-picker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export type DuotonePickerProps = {
'aria-labelledby'?: string;
'aria-label'?: never;
}
);
);

type Color = {
color: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/gradient-picker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type GradientPickerBaseProps = {
'aria-labelledby'?: string;
'aria-label'?: never;
}
);
);

export type GradientPickerComponentProps = GradientPickerBaseProps & {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/popover/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type PlacementToAnimationOriginTuple = [
];
type PlacementToInitialTranslationTuple = [
NonNullable< PopoverProps[ 'placement' ] >,
'translateY' | 'translateX' ,
'translateY' | 'translateX',
CSSProperties[ 'translate' ],
];

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/toolbar/toolbar-group/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export type ToolbarGroupProps = ToolbarGroupPropsBase &
*/
title: string;
}
);
);

export type ToolbarGroupCollapsedProps = DropdownMenuProps;

Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/unit-control/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ describe( 'UnitControl utils', () => {

describe( 'parseQuantityAndUnitFromRawValue', () => {
const cases: [
number | string | undefined ,
number | undefined ,
string | undefined ,
number | string | undefined,
number | undefined,
string | undefined,
][] = [
// Test undefined.
[ undefined, undefined, undefined ],
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/unit-control/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function getParsedQuantityAndUnit(
rawValue?: string | number,
fallbackUnit?: string,
allowedUnits?: WPUnitControlUnit[]
): [ number | undefined , string | undefined ] {
): [ number | undefined, string | undefined ] {
const initialValue = fallbackUnit
? `${ rawValue ?? '' }${ fallbackUnit }`
: rawValue;
Expand Down Expand Up @@ -177,7 +177,7 @@ export function hasUnits(
export function parseQuantityAndUnitFromRawValue(
rawValue?: string | number,
allowedUnits: WPUnitControlUnit[] = ALL_CSS_UNITS
): [ number | undefined , string | undefined ] {
): [ number | undefined, string | undefined ] {
let trimmedValue;
let quantityToReturn;

Expand Down Expand Up @@ -223,7 +223,7 @@ export function getValidParsedQuantityAndUnit(
allowedUnits?: WPUnitControlUnit[],
fallbackQuantity?: number,
fallbackUnit?: string
): [ number | undefined , string | undefined ] {
): [ number | undefined, string | undefined ] {
const [ parsedQuantity, parsedUnit ] = parseQuantityAndUnitFromRawValue(
rawValue,
allowedUnits
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/utils/unit-values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const UNITED_VALUE_REGEX =
*/
export function parseCSSUnitValue(
toParse: string
): [ number | undefined , string | undefined ] {
): [ number | undefined, string | undefined ] {
const value = toParse.trim();

const matched = value.match( UNITED_VALUE_REGEX );
Expand Down

0 comments on commit 9fb33d6

Please sign in to comment.