app-components
Datorama React components library
![GitHub package.json dependency version (dev dep on branch)](https://img.shields.io/github/package-json/dependency-version/datorama/app-components/dev/react.svg)
Installation
npm install --save @datorama/app-components
import { AppTheme, lightTheme } from '@datorama/app-components';
import { ThemeProvider } from 'styled-components';
const App = () => (
<AppTheme theme={lightTheme} provider={ThemeProvider}>
...
</AppTheme>
);
Local Development
Clone the repo, install packages and run;
npm run storybook
Publish a new release
- Make sure that everything is working, well documented and backward compatible.
- Clean up all the lint issues after running
npm run lint
-
Add your release notes with the future version number to the notes page (src/stories/0_Notes.stories.mdx).
-
In your pull request bump the package version to the updated version you documented in the notes (minor
, major
or patch
) by running:
npm version **** [-m "message describing version changes"]
-
Before merging to master, check that you aren't overriding an existing version. If you are - update your branch version and the notes page accordingly.
-
After the pull request is merged to master, checkout to master and run:
npm run build:package
- To publish it to NPM - make sure you're in the root folder and run:
npm publish:package
Alternatively, you can go to the dist folder and run npm publish
.
Importing images
With the current Rollup loader all images are loaded as components!