0.6.2 • Published 6 years ago

styled-ui-kit v0.6.2

Weekly downloads
15
License
MIT
Repository
github
Last release
6 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

6 years ago

0.5.58

6 years ago

0.5.57

6 years ago

0.5.56

6 years ago

0.5.55

6 years ago

0.5.54

6 years ago

0.5.53

6 years ago

0.5.52

6 years ago

0.5.51

6 years ago

0.5.50

6 years ago

0.5.49

6 years ago

0.5.48

6 years ago

0.5.47

7 years ago

0.4.47

7 years ago

0.4.46

7 years ago

0.4.45

7 years ago

0.4.44

7 years ago

0.4.43

7 years ago

0.4.42

7 years ago

0.4.41

7 years ago

0.4.40

7 years ago

0.3.40

7 years ago

0.3.39

7 years ago

0.3.38

7 years ago

0.3.37

7 years ago

0.3.36

7 years ago

0.3.35

7 years ago

0.3.34

7 years ago

0.3.33

7 years ago

0.3.32

7 years ago

0.3.31

7 years ago

0.3.30

7 years ago

0.3.29

7 years ago

0.3.28

7 years ago

0.3.27

7 years ago

0.3.26

7 years ago

0.3.25

7 years ago

0.3.24

7 years ago

0.3.23

7 years ago

0.2.23

7 years ago

0.2.22

7 years ago

0.2.21

7 years ago

0.2.20

7 years ago

0.2.19

7 years ago

0.2.18

7 years ago

0.2.17

7 years ago

0.2.16

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago