Skip to content

Commit 1328195

Browse files
committed
refactor: update examples
1 parent 2539b12 commit 1328195

File tree

10 files changed

+131
-48
lines changed

10 files changed

+131
-48
lines changed

src/components/AppSidebar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ const AppSidebar = () => {
3030

3131
return (
3232
<CSidebar
33-
className="sidebar-dark border-end"
33+
className="border-end"
34+
colorScheme="dark"
3435
position="fixed"
3536
unfoldable={unfoldable}
3637
visible={sidebarShow}

src/views/base/cards/Cards.js

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ const Cards = () => {
5454
Some quick example text to build on the card title and make up the bulk of the
5555
card&#39;s content.
5656
</CCardText>
57-
<CButton href="#">Go somewhere</CButton>
57+
<CButton color="primary" href="#">
58+
Go somewhere
59+
</CButton>
5860
</CCardBody>
5961
</CCard>
6062
</DocsExample>
@@ -235,7 +237,9 @@ const Cards = () => {
235237
<CCardText>
236238
With supporting text below as a natural lead-in to additional content.
237239
</CCardText>
238-
<CButton href="#">Go somewhere</CButton>
240+
<CButton color="primary" href="#">
241+
Go somewhere
242+
</CButton>
239243
</CCardBody>
240244
</CCard>
241245
</DocsExample>
@@ -250,7 +254,9 @@ const Cards = () => {
250254
<CCardText>
251255
With supporting text below as a natural lead-in to additional content.
252256
</CCardText>
253-
<CButton href="#">Go somewhere</CButton>
257+
<CButton color="primary" href="#">
258+
Go somewhere
259+
</CButton>
254260
</CCardBody>
255261
</CCard>
256262
</DocsExample>
@@ -278,7 +284,9 @@ const Cards = () => {
278284
<CCardText>
279285
With supporting text below as a natural lead-in to additional content.
280286
</CCardText>
281-
<CButton href="#">Go somewhere</CButton>
287+
<CButton color="primary" href="#">
288+
Go somewhere
289+
</CButton>
282290
</CCardBody>
283291
<CCardFooter className="text-body-secondary">2 days ago</CCardFooter>
284292
</CCard>
@@ -310,7 +318,9 @@ const Cards = () => {
310318
<CCardText>
311319
With supporting text below as a natural lead-in to additional content.
312320
</CCardText>
313-
<CButton href="#">Go somewhere</CButton>
321+
<CButton color="primary" href="#">
322+
Go somewhere
323+
</CButton>
314324
</CCardBody>
315325
</CCard>
316326
</CCol>
@@ -321,7 +331,9 @@ const Cards = () => {
321331
<CCardText>
322332
With supporting text below as a natural lead-in to additional content.
323333
</CCardText>
324-
<CButton href="#">Go somewhere</CButton>
334+
<CButton color="primary" href="#">
335+
Go somewhere
336+
</CButton>
325337
</CCardBody>
326338
</CCard>
327339
</CCol>
@@ -340,7 +352,9 @@ const Cards = () => {
340352
<CCardText>
341353
With supporting text below as a natural lead-in to additional content.
342354
</CCardText>
343-
<CButton href="#">Go somewhere</CButton>
355+
<CButton color="primary" href="#">
356+
Go somewhere
357+
</CButton>
344358
</CCardBody>
345359
</CCard>
346360
<CCard className="w-50">
@@ -349,7 +363,9 @@ const Cards = () => {
349363
<CCardText>
350364
With supporting text below as a natural lead-in to additional content.
351365
</CCardText>
352-
<CButton href="#">Go somewhere</CButton>
366+
<CButton color="primary" href="#">
367+
Go somewhere
368+
</CButton>
353369
</CCardBody>
354370
</CCard>
355371
</DocsExample>
@@ -364,7 +380,9 @@ const Cards = () => {
364380
<CCardText>
365381
With supporting text below as a natural lead-in to additional content.
366382
</CCardText>
367-
<CButton href="#">Go somewhere</CButton>
383+
<CButton color="primary" href="#">
384+
Go somewhere
385+
</CButton>
368386
</CCardBody>
369387
</CCard>
370388
</DocsExample>
@@ -390,7 +408,9 @@ const Cards = () => {
390408
<CCardText>
391409
With supporting text below as a natural lead-in to additional content.
392410
</CCardText>
393-
<CButton href="#">Go somewhere</CButton>
411+
<CButton color="primary" href="#">
412+
Go somewhere
413+
</CButton>
394414
</CCardBody>
395415
</CCard>
396416
<CCard className="text-center" style={{ width: '18rem' }}>
@@ -399,7 +419,9 @@ const Cards = () => {
399419
<CCardText>
400420
With supporting text below as a natural lead-in to additional content.
401421
</CCardText>
402-
<CButton href="#">Go somewhere</CButton>
422+
<CButton color="primary" href="#">
423+
Go somewhere
424+
</CButton>
403425
</CCardBody>
404426
</CCard>
405427
<CCard className="text-end" style={{ width: '18rem' }}>
@@ -408,7 +430,9 @@ const Cards = () => {
408430
<CCardText>
409431
With supporting text below as a natural lead-in to additional content.
410432
</CCardText>
411-
<CButton href="#">Go somewhere</CButton>
433+
<CButton color="primary" href="#">
434+
Go somewhere
435+
</CButton>
412436
</CCardBody>
413437
</CCard>
414438
</DocsExample>
@@ -449,7 +473,9 @@ const Cards = () => {
449473
<CCardText>
450474
With supporting text below as a natural lead-in to additional content.
451475
</CCardText>
452-
<CButton href="#">Go somewhere</CButton>
476+
<CButton color="primary" href="#">
477+
Go somewhere
478+
</CButton>
453479
</CCardBody>
454480
</CCard>
455481
</DocsExample>
@@ -477,7 +503,9 @@ const Cards = () => {
477503
<CCardText>
478504
With supporting text below as a natural lead-in to additional content.
479505
</CCardText>
480-
<CButton href="#">Go somewhere</CButton>
506+
<CButton color="primary" href="#">
507+
Go somewhere
508+
</CButton>
481509
</CCardBody>
482510
</CCard>
483511
</DocsExample>

src/views/base/collapses/Collapses.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ const Collapses = () => {
2727
>
2828
Link
2929
</CButton>
30-
<CButton onClick={() => setVisible(!visible)}>Button</CButton>
30+
<CButton color="primary" onClick={() => setVisible(!visible)}>
31+
Button
32+
</CButton>
3133
<CCollapse visible={visible}>
3234
<CCard className="mt-3">
3335
<CCardBody>
@@ -81,8 +83,12 @@ const Collapses = () => {
8183
A <code>&lt;CButton&gt;</code> can show and hide multiple elements.
8284
</p>
8385
<DocsExample href="components/collapse#multiple-targets">
84-
<CButton onClick={() => setVisibleA(!visibleA)}>Toggle first element</CButton>
85-
<CButton onClick={() => setVisibleB(!visibleB)}>Toggle second element</CButton>
86+
<CButton color="primary" onClick={() => setVisibleA(!visibleA)}>
87+
Toggle first element
88+
</CButton>
89+
<CButton color="primary" onClick={() => setVisibleB(!visibleB)}>
90+
Toggle second element
91+
</CButton>
8692
<CButton
8793
onClick={() => {
8894
setVisibleA(!visibleA)

src/views/base/jumbotrons/Jumbotrons.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const Jumbotrons = () => {
1818
previous versions of Bootstrap. Check out the examples below for how you can remix and
1919
restyle it to your liking.
2020
</p>
21-
<CButton size="lg">Example button</CButton>
21+
<CButton color="primary" size="lg">
22+
Example button
23+
</CButton>
2224
</CContainer>
2325
<CRow className="align-items-md-stretch">
2426
<CCol md={6}>

src/views/base/placeholders/Placeholders.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ const Placeholders = () => {
3939
Some quick example text to build on the card title and make up the bulk of the
4040
card&#39;s content.
4141
</CCardText>
42-
<CButton href="#">Go somewhere</CButton>
42+
<CButton color="primary" href="#">
43+
Go somewhere
44+
</CButton>
4345
</CCardBody>
4446
</CCard>
4547
<CCard style={{ width: '18rem' }}>

src/views/base/spinners/Spinners.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,19 @@ const Accordion = () => {
9393
as needed.
9494
</p>
9595
<DocsExample href="components/spinner#buttons">
96-
<CButton disabled>
96+
<CButton color="primary" disabled>
9797
<CSpinner component="span" size="sm" aria-hidden="true" />
9898
</CButton>
99-
<CButton disabled>
99+
<CButton color="primary" disabled>
100100
<CSpinner component="span" size="sm" aria-hidden="true" />
101101
Loading...
102102
</CButton>
103103
</DocsExample>
104104
<DocsExample href="components/spinner#buttons">
105-
<CButton disabled>
105+
<CButton color="primary" disabled>
106106
<CSpinner component="span" size="sm" variant="grow" aria-hidden="true" />
107107
</CButton>
108-
<CButton disabled>
108+
<CButton color="primary" disabled>
109109
<CSpinner component="span" size="sm" variant="grow" aria-hidden="true" />
110110
Loading...
111111
</CButton>

src/views/forms/form-control/FormControl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ const FormControl = () => {
183183
<CFormInput type="password" id="inputPassword2" placeholder="Password" />
184184
</div>
185185
<div className="col-auto">
186-
<CButton type="submit" className="mb-3">
186+
<CButton color="primary" type="submit" className="mb-3">
187187
Confirm identity
188188
</CButton>
189189
</div>

src/views/forms/layout/Layout.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ const Layout = () => {
102102
<CFormCheck type="checkbox" id="gridCheck" label="Check me out" />
103103
</CCol>
104104
<CCol xs={12}>
105-
<CButton type="submit">Sign in</CButton>
105+
<CButton color="primary" type="submit">
106+
Sign in
107+
</CButton>
106108
</CCol>
107109
</CForm>
108110
</DocsExample>
@@ -178,7 +180,9 @@ const Layout = () => {
178180
<CFormCheck type="checkbox" id="gridCheck1" label="Example checkbox" />
179181
</div>
180182
</CRow>
181-
<CButton type="submit">Sign in</CButton>
183+
<CButton color="primary" type="submit">
184+
Sign in
185+
</CButton>
182186
</CForm>
183187
</DocsExample>
184188
</CCardBody>
@@ -314,7 +318,9 @@ const Layout = () => {
314318
<CFormCheck type="checkbox" id="autoSizingCheck" label="Remember me" />
315319
</CCol>
316320
<CCol xs="auto">
317-
<CButton type="submit">Submit</CButton>
321+
<CButton color="primary" type="submit">
322+
Submit
323+
</CButton>
318324
</CCol>
319325
</CForm>
320326
</DocsExample>
@@ -353,7 +359,9 @@ const Layout = () => {
353359
<CFormCheck type="checkbox" id="autoSizingCheck2" label="Remember me" />
354360
</CCol>
355361
<CCol xs="auto">
356-
<CButton type="submit">Submit</CButton>
362+
<CButton color="primary" type="submit">
363+
Submit
364+
</CButton>
357365
</CCol>
358366
</CForm>
359367
</DocsExample>
@@ -400,7 +408,9 @@ const Layout = () => {
400408
<CFormCheck type="checkbox" id="inlineFormCheck" label="Remember me" />
401409
</CCol>
402410
<CCol xs={12}>
403-
<CButton type="submit">Submit</CButton>
411+
<CButton color="primary" type="submit">
412+
Submit
413+
</CButton>
404414
</CCol>
405415
</CForm>
406416
</DocsExample>

0 commit comments

Comments
 (0)