cosmian_ui
v0.0.50
Published
Cosmian UI contains a set of React components to create beautiful Cosmian applications.
Downloads
19
Readme
Welcome to Cosmian UI
Cosmian UI contains a set of React components to create beautiful Cosmian applications.
- Works with React 17 and 18 application only
- Written in TypeScript with predictable static types
Components overview
https://cosmian.github.io/cosmian_ui_library
Install
Install Cosmian UI libray in your app using npm or yarn:
npm install cosmian_ui
# or
yarn add cosmian_ui
And import cosmian_ui stylesheets at the top of your main component:
// App.tsx
import "cosmian_ui/style.css";
Usage
Import a component and use it in your app:
import { Button } from "cosmian_ui";
Example with a React app:
import React from "react";
import { Container, Button } from "cosmian_ui";
import "cosmian_ui/style.css";
const App = () => (
<Container>
<p>Welcome user</p>
<Button type="primary" onClick={console.log("Clicked")}>
Click
</Button>
</Container>
);
Developers: create UI components
- Create new components in
src/components
. - Create dedicated story for each components in
src/stories
. - Run storybook in development mode with
npm run storybook
.
Publish UI library
- Upgrade the package version (with
npm version patch
,npm version minor
ornpm version major
). - Build library with
npm run build
. - Publish with
npm publish --access=public
. - Publish storybook with
npm run deploy-storybook
. On github repository, add an empty.nojekyll
file at the root folder.