kripod / glaze

CSS-in-JS microlibrary for making design systems approachable with React
https://glaze.js.org/
MIT License
414 stars 10 forks source link

Migration from Styled System specification #35

Open tatchi opened 4 years ago

tatchi commented 4 years ago

Motivation

What about creating a fromStyledSystem function similar to the existing fromThemeUI one? I think that could make sense since some libraries seem to use (or at least to be based on) this specification.

That would make it easier in the future to migrate theme to these kinds of libraries. Actually we might even base fromThemeUI from this one since the foundation should be quite similar I guess.

Basic example

import { createTheme, fromStyledSystem } from 'glaze';

export default createTheme(fromStyledSystem({
  // Styled System UI tokens, e.g.:

}))