@viratio/react-components
v1.1.8
Published
A React components library using Material UI components.
Downloads
548
Readme
@viratio/react-components
A React components library using Material UI components with custom Viratio branding.
Installation
npm install @viratio/react-componentsUsage
import { PrimaryButton, Theme } from '@viratio/react-components';
function App() {
return (
<Theme>
<PrimaryButton onClick={() => console.log('Clicked!')}>
Click Me
</PrimaryButton>
</Theme>
);
}Components
- Theme: Custom theme provider with Viratio brand colors and typography
- PrimaryButton: Styled primary button component
- JsonViewer: Interactive JSON viewer/editor with color support
- ResponsiveDrawer: Collapsible drawer component for navigation
- Icons: Collection of custom icons
Development
Running Tests
npm testBuilding the Library
npm run buildStorybook
This library uses Storybook for component development and testing. Storybook files are excluded from the production build to keep the package size minimal.
Run Storybook
npm run storybookThis will start Storybook at http://localhost:6006 where you can:
- Browse all components
- Test components interactively
- View documentation
- Experiment with different component states
Build Storybook
npm run build-storybookSee .storybook/README.md for more information about Storybook configuration.
Scripts
npm test- Run Jest testsnpm run build- Build the library for productionnpm run storybook- Start Storybook development servernpm run build-storybook- Build static Storybook sitenpm run format- Format code with Prettiernpm run lint- Check code formattingnpm run tsc- Run TypeScript compiler checks
License
ISC
