This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

sonar-design-system
TypeScript icon, indicating that this package has built-in type declarations

0.9.0 • Public • Published

Sonar Design System

View Storybook

Usage

Installation

yarn add sonar-design-system

Implementation

// App.tsx
import { ThemeProvider, Button } from 'sonar-design-system';

const App = () => (
  <ThemeProvider>
    <Button variant="primary">Primary Button</Button>
  </ThemeProvider>
);

Releases

# Test all components
yarn test
# Create a new build
yarn build
# Choose new version and publish build to repository
yarn publish

Storybook

Start

yarn storybook

Build

yarn build-storybook

Deploy

Commit to master

Theming

Available themes:

  • mercury default
  • gemini

Available shades:

  • light default
  • dark

Overwrite default theme

// App.tsx
import { ThemeProvider, Button } from 'sonar-design-system';

const App = () => (
  <ThemeProvider theme="gemini" shade="dark">
    <Button />
  </ThemeProvider>
);

Get or modify current theme and shade

// Button.tsx
import { useTheme } from 'sonar-design-system';

const Button = () => {
  const { theme, shade, setTheme, setShade } = useTheme();
  return <button />;
};

Fonts

Import directly

import 'sonar-design-system/dist/fonts/maven-pro.woff2';
import 'sonar-design-system/dist/fonts/saira.woff2';

Import by CSS

import 'sonar-design-system/dist/css/fonts.css';

Readme

Keywords

none

Package Sidebar

Install

npm i sonar-design-system

Weekly Downloads

19

Version

0.9.0

License

MIT

Unpacked Size

522 kB

Total Files

93

Last publish

Collaborators

  • bjornvu-sonarsource