From 954d58e1ec00399e7946b437b3b5383c5ef7b5d8 Mon Sep 17 00:00:00 2001 From: ramon Date: Tue, 10 Dec 2024 13:49:00 +1100 Subject: [PATCH] Rebase and update types --- packages/edit-site/src/components/style-book/examples.tsx | 4 ++-- packages/edit-site/src/components/style-book/types.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/edit-site/src/components/style-book/examples.tsx b/packages/edit-site/src/components/style-book/examples.tsx index 20ff3c6fb372f5..dc1519ef423537 100644 --- a/packages/edit-site/src/components/style-book/examples.tsx +++ b/packages/edit-site/src/components/style-book/examples.tsx @@ -100,7 +100,7 @@ function getOverviewBlockExamples( content: ( @@ -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', { diff --git a/packages/edit-site/src/components/style-book/types.ts b/packages/edit-site/src/components/style-book/types.ts index aafba8d31ba4e3..9a97c3aad7f79d 100644 --- a/packages/edit-site/src/components/style-book/types.ts +++ b/packages/edit-site/src/components/style-book/types.ts @@ -32,7 +32,7 @@ export type StyleBookColorGroup = { origin: string; slug: string; title: string; - type: string; + type: 'colors' | 'gradients' | 'duotones'; }; export type Color = { slug: string }; @@ -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 = {