Giter Site home page Giter Site logo

dstoyanoff / e-prim Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 0.0 1014 KB

A set of tools to implement a design system on top of @emotion/css and @emotion/react as well as add some primitive components to make prototyping UI faster and easier

Home Page: https://dstoyanoff.github.io/e-prim/

TypeScript 99.25% JavaScript 0.75%
css-in-js design-system emotion styles typescript

e-prim's Introduction

Hi there ๐Ÿ‘‹

Contact

e-prim's People

Contributors

dstoyanoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

e-prim's Issues

[feature] Strictly typed colors

At the moment, the color config in the theme allows an arbitrary string. With the recent version of Typescript, it's now possible to have string template types which would make it easier to validate the color format. We are looking after:

  • hex: #000000
  • hex with alpha: #000000
  • rgb: rgb(0, 0, 0),
  • rgba: rgba(0, 0, 0, 1)
  • hsl: hsl(0, 0%, 0%)
  • hsla: hsl(0, 0%, 0%, 1) or hsl(0, 0%, 0%, 100%)

[bug] px and py should be combined

The px and py props need to be merged in padding in the resulting style. At the moment all 4 sides are set as different props, which is not optimal

Property 'css' does not exist in the primitives

I tried to use this Box with the css prop from the example. Compiler is not happy.

      <Box
        onClick={console.log}
        p={4}
        shadow="xl"
        css={({ palette }) => ({
          outline: `${palette.warning.normal} solid 1px`,
        })}
      >

And the error is

Property 'css' does not exist on type 'IntrinsicAttributes & MarginSystem & PaddingSystem & PositionProps & SizeProps & ColorProps & BorderProps & { ...; } & { ...; } & Omit<...>'

[feature] Add transparency util

Add an util function in the theme that given a color variable, can add transparency layer. The functionality should be supported for hex, rgb and hsl colors.

Add inline property to Flex

Add inline bool property to the flex component (default false) and render as inline-flex if provided as true.

[feature] Add first-level support for shadows

Shadows are currently not part of the theme, but can rather be used as part of the custom props. Defining shadows as first level citizens would also add a shadow property to the box which can easily be used then.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.