Skip to content

Commit a12191d

Browse files
Merge pull request NotionX#497 from s4nju/feat/add_replit_support
2 parents 1d42f45 + 9fed624 commit a12191d

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

packages/notion-types/src/block.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export type BlockType =
2424
| 'video'
2525
| 'figma'
2626
| 'typeform'
27+
| 'replit'
2728
| 'codepen'
2829
| 'excalidraw'
2930
| 'tweet'
@@ -67,6 +68,7 @@ export type Block =
6768
| VideoBlock
6869
| FigmaBlock
6970
| TypeformBlock
71+
| ReplitBlock
7072
| CodepenBlock
7173
| ExcalidrawBlock
7274
| TweetBlock
@@ -296,6 +298,10 @@ export interface TypeformBlock extends BaseContentBlock {
296298
type: 'typeform'
297299
}
298300

301+
export interface ReplitBlock extends BaseContentBlock {
302+
type: 'replit'
303+
}
304+
299305
export interface CodepenBlock extends BaseContentBlock {
300306
type: 'codepen'
301307
}

packages/react-notion-x/src/block.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,8 @@ export const Block: React.FC<BlockProps> = (props) => {
469469

470470
case 'embed':
471471
return <components.Embed blockId={blockId} block={block} />
472+
case 'replit':
473+
// fallthrough
472474
case 'tweet':
473475
// fallthrough
474476
case 'maps':

packages/react-notion-x/src/components/asset.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { LiteYouTubeEmbed } from './lite-youtube-embed'
1111
const isServer = typeof window === 'undefined'
1212

1313
const supportedAssetTypes = [
14+
'replit',
1415
'video',
1516
'image',
1617
'embed',
@@ -174,7 +175,8 @@ export const Asset: React.FC<{
174175
block.type === 'maps' ||
175176
block.type === 'excalidraw' ||
176177
block.type === 'codepen' ||
177-
block.type === 'drive'
178+
block.type === 'drive' ||
179+
block.type === 'replit'
178180
) {
179181
if (
180182
block.type === 'video' &&

0 commit comments

Comments
 (0)