Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.

SocialGouv/emjpm-ui

Repository files navigation

💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀





💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀









emjpm-ui

ui library for emjpm

netlify

Storybook with auto docs can be found here https://emjpm-design-system.netlify.com

Components

npm version

Core Package

npm version

Installation and Usage

theming

You can use @socialgouv/emjpm-ui-theme or create your own based on that one, it should respect colors and variant

To provide a theme to the app you should use https://theme-ui.com/getting-started/

install dependencies

yarn add theme-ui @emotion/core @mdx-js/react

adding theme to the app

// basic usage
import React from 'react'
import { ThemeProvider } from 'theme-ui'
import theme from '@socialgouv/emjpm-ui-theme'

const App = () => (
  <ThemeProvider theme={theme}>
    <Content/>
  </ThemeProvider>
)

Global Style (reset/normalise.css)

you can use the package @socialgouv/emjpm-ui-global-style and insert it in your head on anywhere you need

in exemple

import { GlobalStyle } from '@socialgouv/emjpm-ui-global-style'

const App =() => (
  <div>
    <GlobalStyle/>
  </div>
)

Core package

you can find the core component in that package.

exemple usage :

import {Button} from "@socialgouv/emjpm-ui-core"

const App =() => (
  <div>
    <Button>Content<Button/>
  </div>
)

Release policy

Auto

Trigger a custom build on Travis (in the "More options" right menu) on the master branch with a custom config:

env:
  global:
    - RELEASE=true

Generate a component with hygen

yarn generate:component
yarn generate:core
yarn generate