orion-ui v0.8.0
Available Scripts
In the project directory, you can run:
yarn run storybook
Runs the react storybook. Open http://localhost:6006 to view it in the browser.
The page will reload if you make edits.
To Deploy the package to NPM
Log in to npm using the command npm login
NOTE: NEVER update the package version yourself by editing package.json, ALWAYS do so by running npm command.
If publishing bug fixes (Backward compatible bug fixes, small features/tweaks)
npm version patch -m "Upgrade to %s for reasons"
0.0.1 -> 0.0.2
If publishing a new feature (Backward compatible large-ish new features)
npm version minor
0.1.5 -> 0.2.0
If publishing major change (Changes that break backward compatibility)
npm version major
1.3.7 -> 2.0.0
Above npm version
commands will increase the version number and automatically take care of git add/commit
for you.
To publish
npm publish
After npm publish
command, you should see the updated version almost instantly on npmjs website.
If it doesn't show up, please double check cache. If clearing cache doens't work, try searching the package directly from npmjs.com search bar, that might show the latest change.
Updating downstream packages after publishing
To update consumers of orion-eui to the latest version (e.g., mona), the below command is usually what you want:
yarn upgrade orion-ui@~YOUR_NEW_VERSION_NUMBER
If you use a different command (there's lots of options), make sure to double-check that the package.json
for the consumer you're updating has actually gone to what you want. Some commands will locally update your package but not alter the package.json
file, so double-check.
How we use Theme file along with Variants
We are using Variants from styled-system, which automatically accesses the Theme file to find a particular component's design. Default variant designs are declared in Theme file.
For example, when you use
<Button>
component and pass a variant prop like this
`<Button variant="primaryButton" />`
it will apply orion-ui's own default design which is declared in Theme.js file. If you want to override it from a client app like Artemis, create buttons obj inside Artemis's own Theme file and it will remove all buttons design coming from orion-ui
1 year ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago