mungwin-react-widgets
v0.0.2
Published
# Your Design counts If you have a widget you love and want to build, this is the place to build it before using it in any mungwin project.
Readme
Mungwin React Widgets
A React widgets library for Mungwin
Your Design counts
If you have a widget you love and want to build, this is the place to build it before using it in any mungwin project.
Proposed workflow
- Checkout
developmentbranch - Pull the latest changes from
developmentwithgit pull - Install the latest changes in
developmentwithnpm install - Create and checkout your new branch, name it as
issue_name-issue_number/component_nameor any other relevant name you choose - Design you components
mungwin-react-elementsis a dev dependency to this project, so the first place to start is there.- Break down your widget into small components, if you don't find a component in
mungwin-react-elements, then you have to build it there first, - Link your projects and test first before creating you PR
- in
mungwin-react-elementsroot folder, runnpm link - in
mungwin-react-widgetsroot folder, runnpm link mungwin-react-elementsthis will link both projects on your local machine, so you can develop components for your widgets inmungwin-react-elementsand use them to developmungwin-react-widgetsbefore making youPR
- in
- Design your widget
- You can use
css file importsor@emotion/styledwhichever you choose is up to you - Put your widgets in
src/widgets/your_widget_folder/YourWidget.component.js - If you choose to use styled components with
@emotion/styled, put your styles insrc/widgets/your_widget_folder/YourWidget.styles.jsand export them, then import them inYourComponent.js - If you choose to use css, put your styles in
src/widgets/your_widget_folder/YourWidget.styles.css, then import them inYourWidget.component.js
- Test your widget with storybook
- Put your widtet stories in
src/widgets/your_widget_folder/YourWidget.stories.js - Test their functionality, it should look
great
- Export your widget for public consumption in
src/index.jsuse the formatexport {default as YourWidget} from './widgets/your_widget_folder/YourWidget.component' - Lint your code
- Run
npm run lint:fix
- Commit your changes
- Push your code create a
PR
