Sandals Church React Components
A combination of react components used throughout Sandals Church applications.
yarn add @sandals/real-components# ornpm install @sandals/real-components
import Modal from '@sandals/real-components';const App =return<Modal>Hello</Modal>
To see the all of the components, clone this repository and run
yarn install yarn storybook
Creating new components
The best way to develop is components is to run
yarn storybook and create a unique page for your components. Once your component is ready for usage include it in src/components/index.js and export it.
import MyNewComponents from './MyNewComponents';;
Before pushing you update, make sure to run
yarn build and commit the dist directory.
Testing your components
Each components should have a test file under
/src/tests. We use Jest alongside React Testing Library. If you are new to React Testing Library, checkout this video, it's also always useful to read through their documentation. For running your test you can use the following scripts.
# runs one timeyarn test# listens for file changesyarn test --watch
Before you push your changes, make sure you write a test for it and check that it did not cause any other tests to fail.