1.0.15 • Published 4 years ago

gc-styles v1.0.15

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

gc-styles

react-components library based on react-hooks and styled-components

install

npm i gc-styles

using
import {Button} from 'gc-styles'
...
return <Button />

See the demo | source

Examples

import React from 'react';
import { Theme, ThemeSwitcher, Button } from 'gc-styles';

const App = () => (
    <Theme defaultThemeName={localStorage.getItem('theme')}>

        // a high-order style inject object
        <GlobalStyle/>

        // component to change the theme
        <ThemeSwitcher>
            <Button>Change theme</Button>
        </ThemeSwitcher>
    </Theme>
);

Props

Required* props

Autocomplete

nametypedefault
onChange*function
options*array of value objects
placeholderstring
useOptionsOnlyboolfalse
Valueobject{id: '', label: ''}

Button

nametypedefaultoptions
typestring'default''default', 'info', 'success', 'warning', 'error'
sizestring'sm''sm', 'md', 'lg'
isFilledbooltrue
disabledboolfalse

Checkbox

nametypedefault
defaultCheckedbool
checkedbool
onChangefunc
namestring
valuestring
disabledboolfalse

Dropdown

nametypedefault
iconstring
title*string
onOpenfunc
onClosefunc
disabledboolfalse

Icon

nametype
name*string

Input

nametypedefaultoptions
readOnlyboolfalse
disabledboolfalse
invalidboolfalse
iconstringnull
iconPositionstring'right''left', 'right'
iconClickHandlerfuncnonefunction(event, input)
unlightstring'none''none' ,'default', 'info', 'success', 'warning', 'error'

MultipleInput

nametypedefault
options*array of string
onChange*func
allowCustomDataboolfalse
placeholderstring''

Password

nametypedefaultoptions
invalidboolfalse
unlightstring'none''none' ,'default', 'info', 'success', 'warning', 'error'
regExpregExpnull
onChangefuncnull

RadioButton

nametypedefault
defaultCheckedboolfalse
checkedbool
onChangefunc
namestring
disabledboolfalse

Theme

Contains default themes for providing theme-context for components.

nametypedefaultoptions
defaultThemeNamestring'lightTheme''lightTheme', 'darkTheme'

Tooltip

nametypedefaultoptions
messagestring''
messageTypestring'default''default', 'info', 'success', 'warning', 'error'
orientationstring'right''left', 'right', 'top', 'bottom'
isActiveboolfalse

License

MIT

keywords

react style hooks css-in-js styling color styled-components

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.9

4 years ago

1.0.10

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago