A library of components used to build the Atila website
You can view the components at: https://bit.dev/atila/web-components-library
This project can either be run as a React web server or a Bit Server
To run as a React web server
yarn installyarn start
To run as a Bit server
bit install
yarn test
To test a specific file: yarn test SomeTestFileToRun, for example yarn test Currency
-
Summary of this tutorial: Getting Started with Bit
-
Create a tsx folder and file for the component:
src/components/MyComponent/MyComponent.tsx -
Create a compositions file
src/components/MyComponent/MyComponent.compositions.tsx -
Make sure to import stylesheets into the compostions file
-
Note: We're looking into a way to automatically import the stylesheets in all compositions
import 'bootstrap/dist/css/bootstrap.css'; import 'antd/dist/antd.css';
-
-
Add using Bit:
bit add src/components/MyComponent/ --namespace ui -
To remove:
bit remove ui/my-component
bit compilebit start
- If you're having issues with importing components in other components, try:
bit linkto link yournode_moduleswith your workspace
bit statusto see what changes have been made- Tag the component you changed:
bit tag <component_id> --patch --message "first version"- Use
bit listto find your component ID - Example:
bit tag atila.web-components-library/ui/crypto-payment-form --patch --message "added support for binance and testnets"
- Use
- If you want to tag all modified components:
bit tag --all --message "add my component"- Don't literally use my component, give it a descriptive message
- export:
bit export - commit your changes:
git commit -am "updated .bitmap file to new version"Go to https://bit.dev/atila/web-components-library to see your exported components.