feat: add CSwitch examples to forms

This commit is contained in:
woothu 2020-08-12 16:57:49 +02:00
parent eef84dbbd7
commit b31e452fd0
2 changed files with 47 additions and 2 deletions

View File

@ -28,7 +28,8 @@ import {
CInputGroupText, CInputGroupText,
CLabel, CLabel,
CSelect, CSelect,
CRow CRow,
CSwitch
} from '@coreui/react' } from '@coreui/react'
import CIcon from '@coreui/icons-react' import CIcon from '@coreui/icons-react'
import { DocsLink } from 'src/reusable' import { DocsLink } from 'src/reusable'
@ -285,6 +286,50 @@ const BasicForms = () => {
</CSelect> </CSelect>
</CCol> </CCol>
</CFormGroup> </CFormGroup>
<CFormGroup row>
<CCol tag="label" sm="3" className="col-form-label">
Switch checkboxes
</CCol>
<CCol sm="9">
<CSwitch
className="mr-1"
color="primary"
defaultChecked
/>
<CSwitch
className="mr-1"
color="success"
defaultChecked
variant="outline"
/>
<CSwitch
className="mr-1"
color="warning"
defaultChecked
variant="opposite"
/>
<CSwitch
className="mr-1"
color="danger"
defaultChecked
shape="pill"
/>
<CSwitch
className="mr-1"
color="info"
defaultChecked
shape="pill"
variant="outline"
/>
<CSwitch
className="mr-1"
color="dark"
defaultChecked
shape="pill"
variant="opposite"
/>
</CCol>
</CFormGroup>
<CFormGroup row> <CFormGroup row>
<CCol md="3"> <CCol md="3">
<CLabel>Radios</CLabel> <CLabel>Radios</CLabel>

View File

@ -163,7 +163,7 @@ const Alerts = () => {
/> />
</CAlert> </CAlert>
<CButton onClick={() => setVisible(10)}> <CButton color="primary" onClick={() => setVisible(10)}>
Reset timer Reset timer
</CButton> </CButton>
</CCardBody> </CCardBody>