If you are looking to help to with a code contribution our project uses:
If you don’t feel ready to make a code contribution yet, no problem! You can also check out the documentation issues highlighted with a documentation
label or are welcome to make suggestions on the new design
issues label we have created.
If you are interested in making a code contribution and would like to learn more about the technologies that we use, check out the list below.
We use React as the backbone for the project. Each component is encapsulated with it’s own Storybook .mdx
file and .test.js
Jest test as best practice. We will still accept PR submissions without tests. All variants of a component should be kept within the same file and then later exported in src/index.js
to be made accessible to the user when published to https://www.npmjs.com/
and later downloaded as a package.
A good example to see how this works in practice is to look at the Check.js
component located at src/components/forms/Check.js
.
Official Docs: https://reactjs.org/docs/getting-started.html
SC is used in lieu of other tools like SASS or CSS as it provides a number of benefits to a component library. The tool uses CSS-in-JS and template literals to style html elements. For further information, take a look at the docs and some of the other components to see how this is done in practice.
If you’re not familiar with testing with Jest, then don’t worry. We’re still happy to accept any contributions you are able to make. If you are able to use Jest, then including test cases with your PR submissions would be fantastic!
We use Storybook as a style guide and a tool to produce online technical documentation for the library. Again, we’re happy to accept PRs that don’t include a Storybook .mdx
file for the component but if you are comfortable creating one then that would be fantastic. You can take a look at the other components to see how it’s done and the links below. A nice simple example to start with would be the Button.js
component.
After you have forked and cloned the project onto your machine you can run the following to start getting the project to run on your machine.
npm start
This will start the create-react-app in your browser at port 3000. On a Windows OS that will be http://localhost:3000/
. Nothing will currently appear as the project hasn’t been built like this but you can use it as a sandbox environment while you build your components.
npm run storybook
This is how most development has been done and will enable you to not only test your components but also test Storybook documentation and prop type information too. It’s up to you how you wish to build though. This will be available on port 9009 or on a Windows OS http://localhost:9009
.
If you need help, you can ask questions on the issue itself or DM me on Twitter at https://twitter.com/danielpnorris.
Our Code of Conduct means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code.