Skip to content

Commit b31e452

Browse files
committed
feat: add CSwitch examples to forms
1 parent eef84db commit b31e452

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

src/views/base/forms/BasicForms.js

+46-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ import {
2828
CInputGroupText,
2929
CLabel,
3030
CSelect,
31-
CRow
31+
CRow,
32+
CSwitch
3233
} from '@coreui/react'
3334
import CIcon from '@coreui/icons-react'
3435
import { DocsLink } from 'src/reusable'
@@ -285,6 +286,50 @@ const BasicForms = () => {
285286
</CSelect>
286287
</CCol>
287288
</CFormGroup>
289+
<CFormGroup row>
290+
<CCol tag="label" sm="3" className="col-form-label">
291+
Switch checkboxes
292+
</CCol>
293+
<CCol sm="9">
294+
<CSwitch
295+
className="mr-1"
296+
color="primary"
297+
defaultChecked
298+
/>
299+
<CSwitch
300+
className="mr-1"
301+
color="success"
302+
defaultChecked
303+
variant="outline"
304+
/>
305+
<CSwitch
306+
className="mr-1"
307+
color="warning"
308+
defaultChecked
309+
variant="opposite"
310+
/>
311+
<CSwitch
312+
className="mr-1"
313+
color="danger"
314+
defaultChecked
315+
shape="pill"
316+
/>
317+
<CSwitch
318+
className="mr-1"
319+
color="info"
320+
defaultChecked
321+
shape="pill"
322+
variant="outline"
323+
/>
324+
<CSwitch
325+
className="mr-1"
326+
color="dark"
327+
defaultChecked
328+
shape="pill"
329+
variant="opposite"
330+
/>
331+
</CCol>
332+
</CFormGroup>
288333
<CFormGroup row>
289334
<CCol md="3">
290335
<CLabel>Radios</CLabel>

src/views/notifications/alerts/Alerts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const Alerts = () => {
163163
/>
164164
</CAlert>
165165

166-
<CButton onClick={() => setVisible(10)}>
166+
<CButton color="primary" onClick={() => setVisible(10)}>
167167
Reset timer
168168
</CButton>
169169
</CCardBody>

0 commit comments

Comments
 (0)