feat: add status prop in checkbox, radio, select, slider and toggle (#530)

* feat: added status prop to set color by states

test: check status success, warning and error

* docs: added playground example and API reference

fix: replaced ´_´ as it's not recommended to use

fix: removed redundant return

refactor: renamed prop from status to type

test: update test with the renamed prop

* docs: update prop references from status to type

fix: status prop not updated to type

fix: missing return

* fix(select): set icons and hover state to follow the theme

* test(slider): update snapshots

* chore: always use relative paths when import types

Co-authored-by: unix <unix.bio@gmail.com>
This commit is contained in:
gepd
2021-06-05 08:50:44 -04:00
committed by unix
parent f6e39cf930
commit 5bbce55465
50 changed files with 1881 additions and 145 deletions

View File

@@ -1,12 +1,13 @@
import React from 'react'
import { NormalSizes, NormalTypes } from 'components/utils/prop-types'
import { NormalSizes, NormalTypes } from '../utils/prop-types'
export interface Props {
value?: string
initialValue?: string
placeholder?: string
size?: NormalSizes
status?: NormalTypes
type?: NormalTypes
hymlType?: string
readOnly?: boolean
disabled?: boolean
label?: string
@@ -32,7 +33,8 @@ export const defaultProps = {
iconClickable: false,
width: 'initial',
size: 'medium' as NormalSizes,
status: 'default' as NormalTypes,
type: 'default' as NormalTypes,
htmlType: 'text',
autoComplete: 'off',
className: '',
placeholder: '',