Skip to content
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

[feature] Automatic props table for components #48

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

yairEO
Copy link
Contributor

@yairEO yairEO commented May 25, 2021

⚠️ This is a POC for the collapsible component.
If approved, all other files should use this automatic method of extraction.


Usage (in mdx file)

<PropsTable filePath="components/Collapsible/Collapsible.props" />

Currently it lazy-loads the file automatically inside PropsTable.jsx where the path is for the webrix project folder which is a sibling to this webrix-docs folder

This should be taken into account in the pipeline (solution yet to to be finalized)

image

Yair Even Or added 7 commits May 24, 2021 14:31
…-docs into feature/auto-props

# Conflicts:
#	package-lock.json
#	package.json
#	src/components/PropsTable/PropsTable.jsx
#	src/content/docs/components/collapsible/readme.mdx
@vercel
Copy link

vercel bot commented May 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/ykadosh/webrix-docs/k1RVqqRb7HfWFsSov4S8CyjqPytE
✅ Preview: https://webrix-docs-git-fork-yaireo-feature-auto-props-ykadosh.vercel.app

padding: 0 7px;
margin: 0;
font-size: .8em;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not write this, but copied dolve's file

net: false,
path: require.resolve('path-browserify'),
process: require.resolve('process/browser'),
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are imperative for react-docgen to be able to be imported correctly.

(Took me hours to get this to work properly)

],
},
},
],
Copy link
Contributor Author

@yairEO yairEO May 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not change all these above modifications, maybe the linter did this, not sure.

Maybe it was like this already when I copied dolev's branch

]
new webpack.ProvidePlugin({
process: 'process',
Buffer: ['buffer', 'Buffer'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, these are imperative for react-docgen to be able to be imported correctly.

(Took me hours to get this to work properly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant