0.6.2 • Published 5 years ago

styled-ui-kit v0.6.2

Weekly downloads
15
License
MIT
Repository
github
Last release
5 years ago

Styled-Ui-Kit

StyledUiKit is a UI component library built with styled-components.

Installed

npm i --save styled-ui-kit

Getting Started

index.js

import React from 'react';
import ReactDOM from 'react-dom';
import App from './app.jsx';
import { globalConfig } from 'styled-ui-kit'

globalConfig();

ReactDOM.render(<App/>, document.getElementById('root'));

Default theme

{
  background: '#DFE5EA',
  textColor: '#111315',
  alternateTextColor: '#4a4a4a',
  secondaryTextColor: '#4a5258',
  linkColor: '#206dd1',
  hoverLinkColor: '#363636',
  font: {
    fontFamily: 'Arial, Helvetica, sans-serif',
    fontSize: '14px',
    fontWeight: "normal",
    fontDefault: 300,
    fontSemibold: 500,
    fontBold: 600
  }, 
  header: {
    background: '#f8f9fa',
    borderColor: '#dadfe3'
  },
  card: {
    header: {
      background: '#f8f9fa',
      borderColor: '',
      titleColor: '#2D1133'
    },
    body: {
      background: '#fff'
    },
    footer: {
      background: '#f8f9fa'
    }
  },
  button: {
    baseRadius: '2px',
    smallFontSize: '13px',
    defaultBg: '#fff',
    primaryBg: '#253649',
    disabledBg: '#efefef',
    defaultTextColor: '#111315',
    primaryTextColor: '#fff',
    disabledTextColor: '#111315',
    borderDefault: '#dadfe3',
    borderPrimary: '#253649',
    borderDisabled: '#dadfe3',
    hoverDefault: '',
    hoverPrimary: '#253649',   
    hoverDisabled: ''
  },
  brand: {
    primary: '#cce5ff',
    secondary: '#e2e3e5',
    success: '#d4edda',
    danger: '#f8d7da',
    warning: '#fff3cd',
    info: '#d1ecf1',
    light: '#fefefe',
    dark: '#d6d8d9'
  }
}

app.jsx

Configuring default theme properties with the custom theme properties directly

import React from 'react'
import { Theme, configTheme, Button, Alert, Tooltip } from 'styled-ui-kit'

const App = props => {
  const customTheme = { background: 'red', button: { primaryBg: 'yellow' } };
  const theme = configTheme(customTheme);
  return(
    <Theme theme={theme}>
      <div className="wrapper"> 
        <Alert info>This is the Example of info alert</Alert>
        <Button>Cancel</Button>
        <Button primary>
          <Tooltip title="SAVE">
            Save
          </Tooltip>
        </Button>
      </div>
    </Theme>
  )};
export default App;

Overwriting default theme properties with the custom theme properties

import React from 'react'
import { Theme, configTheme, Button, themeDefault, Alert, Tooltip } from 'styled-ui-kit'

const App = props => {
  const customTheme = { background: 'red', button: { ...themeDefault.button, primaryBg: 'yellow' } };
  const theme = configTheme(customTheme);
  return(
    <Theme theme={theme}>
      <div className="wrapper"> 
        <Alert info>This is the Example of info alert</Alert>
        <Button>Cancel</Button>
        <Button primary>
          <Tooltip title="SAVE">
            Save
          </Tooltip>
        </Button>
      </div>
    </Theme>
)};
export default App;

Documentation

  • Docs(currently not available)
0.6.2

5 years ago

0.5.58

5 years ago

0.5.57

5 years ago

0.5.56

5 years ago

0.5.55

5 years ago

0.5.54

5 years ago

0.5.53

5 years ago

0.5.52

5 years ago

0.5.51

5 years ago

0.5.50

5 years ago

0.5.49

5 years ago

0.5.48

5 years ago

0.5.47

5 years ago

0.4.47

6 years ago

0.4.46

6 years ago

0.4.45

6 years ago

0.4.44

6 years ago

0.4.43

6 years ago

0.4.42

6 years ago

0.4.41

6 years ago

0.4.40

6 years ago

0.3.40

6 years ago

0.3.39

6 years ago

0.3.38

6 years ago

0.3.37

6 years ago

0.3.36

6 years ago

0.3.35

6 years ago

0.3.34

6 years ago

0.3.33

6 years ago

0.3.32

6 years ago

0.3.31

6 years ago

0.3.30

6 years ago

0.3.29

6 years ago

0.3.28

6 years ago

0.3.27

6 years ago

0.3.26

6 years ago

0.3.25

6 years ago

0.3.24

6 years ago

0.3.23

6 years ago

0.2.23

6 years ago

0.2.22

6 years ago

0.2.21

6 years ago

0.2.20

6 years ago

0.2.19

6 years ago

0.2.18

6 years ago

0.2.17

6 years ago

0.2.16

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago