@aesthetic/addon-mixins
TypeScript icon, indicating that this package has built-in type declarations

0.2.11 • Public • Published

Aesthetic - Design System Mixins

Build Status npm version npm deps

CSS-in-JS mixins for the Aesthetic design system.

import mixins from '@aesthetic/addon-mixins';
import { Design } from '@aesthetic/system';

// Configure design system with mixins
const design = new Design(
  'dls',
  {
    /* ... */
  },
  mixins,
);

// Generate CSS properties from theme
const theme = design.createTheme(
  { contrast: 'normal', scheme: 'light' },
  {
    /* ... */
  },
);

const css = theme.mixin('background', { palette: 'success' }, { borderWidth: 1 });

// OR with type safety
const css = theme.mixin.background({ palette: 'success' }, { borderWidth: 1 });

Installation

yarn add @aesthetic/addon-mixins

Documentation

https://aestheticsuite.dev

Package Sidebar

Install

npm i @aesthetic/addon-mixins

Weekly Downloads

2

Version

0.2.11

License

MIT

Unpacked Size

63.6 kB

Total Files

33

Last publish

Collaborators

  • milesj