Skip to content

yangchristina/design-system

Repository files navigation

Stable Release

Built off of radix-ui/design-system

Built with Stitches and Radix UI Primitives.

Installation

npm install --save @planda/design-system
npm install --save next-transpile-modules

Usage with Next.js pages directory

// next.config.js
const withTM = require('next-transpile-modules')(['@planda/design-system'])
// ...
module.exports = withTM(nextConfig)
// _document.js
import { fixStitchesCssNumbers } from '@planda/design-system'
import { getCssText, reset } from '../stitches.config';
import { getCssText as dsGet, reset as dsReset } from '@planda/design-system';
// ...
  <style
    id="stitches"
    dangerouslySetInnerHTML={{ __html: fixStitchesCssNumbers(getCssText(), dsGet()) }}
  />
// ...

Bugs log

  • unexpected token: tsconfig-> "jsx": "react", (preserve caused error)