Skip to content

Commit

Permalink
feat: add CSwitch examples to forms
Browse files Browse the repository at this point in the history
  • Loading branch information
woothu committed Aug 12, 2020
1 parent eef84db commit b31e452
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
47 changes: 46 additions & 1 deletion src/views/base/forms/BasicForms.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import {
CInputGroupText,
CLabel,
CSelect,
CRow
CRow,
CSwitch
} from '@coreui/react'
import CIcon from '@coreui/icons-react'
import { DocsLink } from 'src/reusable'
Expand Down Expand Up @@ -285,6 +286,50 @@ const BasicForms = () => {
</CSelect>
</CCol>
</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>
<CCol md="3">
<CLabel>Radios</CLabel>
Expand Down
2 changes: 1 addition & 1 deletion src/views/notifications/alerts/Alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const Alerts = () => {
/>
</CAlert>

<CButton onClick={() => setVisible(10)}>
<CButton color="primary" onClick={() => setVisible(10)}>
Reset timer
</CButton>
</CCardBody>
Expand Down

0 comments on commit b31e452

Please sign in to comment.