@dahu-labs/obsidian-ui v1.2.24
Introduction
Obsidian UI is the library for using the DAHU LABS design system in react applications
Installation
Run the following commands to add Obsidian UI to your react project:
yarn add @dahu-labs/obsidian-ui
Peer dependencies and node engine
react
>= 18.0.0 and node
>= 18.0.0 are needed for running the library.
Usage with React
We use Material UI as the base of most of the components. So, in order to make the library use the custom colors in the theme we need to wrap the root of the application in a theme provider which is exported by itself.
import { CssBaseline, ThemeProvider, customTheme } from '@dahu-labs/obsidian-u';
export const withMuiTheme = ({ children }) => {
return (
<ThemeProvider theme={customTheme}>
<CssBaseline />
{children}
</ThemeProvider>
);
};
Material UI provides a CssBaseline
component. It fixes some inconsistencies across browsers and devices. More info can be found here.
Once the theme is defined we can use the library components. All components are available as modules and you can use them as any other React component.
// Import the Button component
import { Button } from '@dahu-labs/obsidian-u';
// Use the Button component
<Button>Button label</Button>;
Local development
We use vite
as a CLI for managing the react package.
Run Storybook inside terminal to see the real time changes of the components:
yarn storybook
This loads the stories from ./stories
.
Once you have finished the changes you can publish the version if needed following this steps:
- Check this site above to see the latest version
yarn build
- Commit your changes
- Update the package version in package.json. You can use
npm version patch
to update this npm publish
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
6 months ago
6 months ago
6 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
11 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago