chart-concept
v0.1.0
Published
Library of reusable components, themes, and supporting elements for developing front-end projects within the CCT company.
Downloads
3
Readme
UI Components
Library of reusable components, themes, and supporting elements for developing front-end projects within the CCT company.
Usage
- Install the package
npm install @communitycapital/ui-components - Use ThemeProvider to have the same styles
import { getMuiTheme, ThemeProvider } from '@communitycapital/ui-components';const muiTheme = getMuiTheme(theme));<ThemeProvider theme = { muiTheme }>{children}</ThemeProvider>. - Import needed component/helper function
import { Tooltip } from '@communitycapital/ui-components'; - Use common fonts
import '@communitycapital/ui-components/fonts/index.css';
Reason behind using UMD instead of ES
We had to use UMD build format instead of ES due to Styled Components library has issue with ES https://github.com/rollup/rollup/issues/4438. Another alternative would be migrating from Styled Components to Emotion. Thoughts regarding it can be found here https://app.clickup.com/14159275/v/dc/dg3db-14031/dg3db-23111
Dependencies and updating dependencies.
Important! All dependencies must be frozen to avoid problems with automatic dependency updates during deployment.
- After updating
libphonenumber-metadata-generatorpackage, we need to re-generate metadata forlibphonenumber-jspackage. Please, runnpm run generate-libphonenumber-metadatafor it.
