Skip to content

Commit

Permalink
chore: fix uikit PreviewBlock typings (#32676)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Jun 25, 2024
1 parent 24f7df4 commit c3489db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ui-kit/src/blocks/layout/PreviewBlock.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { LayoutBlockType } from '../LayoutBlockType';
import type { LayoutBlockish } from '../LayoutBlockish';
import type { TextObject } from '../TextObject';
import type { ContextBlock } from './ContextBlock';

Expand Down Expand Up @@ -28,7 +29,7 @@ export type PreviewBlockWithPreview = PreviewBlockBase & {
thumb: undefined;
};

export type PreviewBlock = PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview;
export type PreviewBlock = LayoutBlockish<PreviewBlockBase | PreviewBlockWithThumb | PreviewBlockWithPreview>;

export const isPreviewBlockWithThumb = (previewBlock: PreviewBlock): previewBlock is PreviewBlockWithThumb => 'thumb' in previewBlock;

Expand Down

0 comments on commit c3489db

Please sign in to comment.