NotionX / NotionX/react-notion-x
Export default components so that they can be overriden easily
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
Description
I'd like to be able to use custom components only for certain cases such as:
- Images/Videos that are from a certain source
- Certain Embed types
more examples could be found.
The idea
const components = useMemo(() => {
Embed: (props) => {
if (props.smt === 'criteria') { return <div>something</div> }
return <defaultComponents.Embed {...props} />
}
}, [...]);
Notion Test Page ID
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start at the package's public component entry point and locate how default components such as Embed, image, and video are defined and exported. Check the existing component customization path, then verify that consumers can import defaults and use them as fallbacks when overriding selected cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100