Skip to content

Commit

Permalink
Rebase and update types
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Dec 10, 2024
1 parent de955f1 commit 954d58e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/edit-site/src/components/style-book/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function getOverviewBlockExamples(
content: (
<ColorExamples
colors={ themePalette.colors }
type={ colors }
type="colors"
templateColumns="repeat(auto-fill, minmax( 200px, 1fr ))"
itemHeight="32px"
/>
Expand All @@ -111,7 +111,7 @@ function getOverviewBlockExamples(
}

// Get examples for typography blocks.
const typographyBlockExamples: Block[] = [];
const typographyBlockExamples: BlockType[] = [];

if ( getBlockType( 'core/heading' ) ) {
const headingBlock = createBlock( 'core/heading', {
Expand Down
6 changes: 4 additions & 2 deletions packages/edit-site/src/components/style-book/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type StyleBookColorGroup = {
origin: string;
slug: string;
title: string;
type: string;
type: 'colors' | 'gradients' | 'duotones';
};

export type Color = { slug: string };
Expand All @@ -44,7 +44,9 @@ export type Duotone = {

export type ColorExampleProps = {
colors: Color[] | Gradient[];
type: string;
type: StyleBookColorGroup[ 'type' ];
templateColumns?: string | number;
itemHeight?: string;
};

export type ColorOrigin = {
Expand Down

0 comments on commit 954d58e

Please sign in to comment.