-
Notifications
You must be signed in to change notification settings - Fork 162
Adds ability to override components from consuming app #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
facbe77
677f4bb
6f07014
8a77d24
356f17a
a8d7b3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ | |
* | ||
*/ | ||
|
||
import { FC } from "react"; | ||
|
||
/** | ||
* Base properties that all blocks share. | ||
*/ | ||
|
@@ -256,6 +258,13 @@ interface TableCollectionType extends BaseValueType { | |
}; | ||
} | ||
|
||
export interface TweetType extends BaseValueType { | ||
type: "tweet"; | ||
properties: { | ||
source: [string[]]; | ||
}; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding the tweet interface here avoids the need to add it to the consuming app. |
||
|
||
export type CollectionViewType = TableGalleryType | TableCollectionType; | ||
|
||
/** | ||
|
@@ -282,7 +291,10 @@ export type BlockValueType = | |
| CalloutValueType | ||
| BookmarkValueType | ||
| ToggleValueType | ||
| CollectionValueType; | ||
| CollectionValueType | ||
| TweetType; | ||
|
||
export type BlockValueTypeKeys = Pick<BlockValueType, "type">["type"]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This creates a type of all the "type" keys in |
||
|
||
export interface BlockType { | ||
role: string; | ||
|
@@ -329,3 +341,9 @@ export interface LoadPageChunkData { | |
|
||
export type MapPageUrl = (pageId: string) => string; | ||
export type MapImageUrl = (image: string) => string; | ||
|
||
export interface CustomComponentProps { | ||
blockValue: BlockValueType; | ||
} | ||
|
||
export type CustomComponent = FC<CustomComponentProps>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Husky was preventing commits without this prettier change.