Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/src/circular-option-picker/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
/**
* External dependencies
*/
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/color-palette/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
/**
* External dependencies
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/color-picker/color-display.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { colord, extend, Colord } from 'colord';
import type { Colord } from 'colord';

/**
* WordPress dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/color-picker/color-input.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { colord, extend, Colord } from 'colord';
import type { Colord } from 'colord';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/color-picker/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const ColorPicker = (
} );

const safeColordColor = useMemo( () => {
return colord( color );
return colord( color || '' );
}, [ color ] );

const debouncedSetColor = useDebounce( setColor );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ function getColorFromLegacyProps( props: LegacyProps ): string | undefined {
if ( props.color.hex ) {
return props.color.hex;
}

return undefined;
}

const transformColorStringToLegacyColor = memoize(
Expand Down
3 changes: 3 additions & 0 deletions packages/components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"src/base-field/**/*",
"src/button/**/*",
"src/card/**/*",
"src/circular-option-picker/**/*",
"src/color-palette/**/*",
"src/color-picker/**/*",
"src/confirm-dialog/**/*",
"src/dashicon/**/*",
"src/disabled/**/*",
Expand Down