README
Zoids
Composable React Components for ClearTax! Used across ClearTax GST and other products
Adding a component
- Create a folder with a component name. (Three things to consider, .tsx file, types.ts and a styling.ts file). For example, let's say we need to make a component for
Button
. Create aButton.tsx
file insrc/components
. Create atypes.ts
file insrc/components/Button
folder andstyle.ts
file in the same location. - Please make sure to add a functional component, instead of a class based component
Types file/ Styles file
- Normal styling to be added using styled-components
- Make sure that you're adding types with proper comments
Benchmarking
- Performance benchmarking of the component needs to be done
- Copy/Paste the component in the benchmark folder. (Refer to any file in the folder)
- Please note that you import a build component, instead of a raw one
- Number of component instances is specified under
benchmark/index.ts
Miscellaneous
- Expose the component to the
src/index.ts
file - Add documentation for the component (You will have to add it to test your react components)
Sections.js
(style guide) file picks up the .md file for documentation- You can use
zoids-snippets
extension from VScode marketplace to help you with the dev process. (Optional)
Branching rules
- Master branch is the production branch for zoids. (Should always remain stable)
- Development branch is the staging branch. All the branches should be checked out of this branch and PRs be raised against this branch.