Skip to content

Commit be0f305

Browse files
committed
refactor: change widget names
1 parent 21b6455 commit be0f305

File tree

8 files changed

+74
-74
lines changed

8 files changed

+74
-74
lines changed

docs/4.0/components/CWidgets.mdx

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ import {
1919
CDropdownToggle,
2020
CLink,
2121
CRow,
22-
CWidgetA,
23-
CWidgetB,
24-
CWidgetC,
25-
CWidgetD,
26-
CWidgetE,
27-
CWidgetF,
22+
CWidgetStatsA,
23+
CWidgetStatsB,
24+
CWidgetStatsC,
25+
CWidgetStatsD,
26+
CWidgetStatsE,
27+
CWidgetStatsF,
2828
} from '../../../src/index.ts'
2929

3030

3131
## Examples
3232

3333
React Alert is prepared for any length of text, as well as an optional close button. For a styling, use one of the **required** contextual `color` props (e.g., `primary`). For inline dismissal, use the [dismissing prop](#dismissing).
3434

35-
## CWidgetA
35+
## CWidgetStatsA
3636

3737
<Playground>
3838
<CRow>
3939
<CCol sm={6}>
40-
<CWidgetA
40+
<CWidgetStatsA
4141
className="mb-4"
4242
color="primary"
4343
value={<>$9.000 <span className="fs-6 fw-normal">(40.9% <CIcon icon={cilArrowTop} />)</span></>}
@@ -117,7 +117,7 @@ React Alert is prepared for any length of text, as well as an optional close but
117117
/>
118118
</CCol>
119119
<CCol sm={6}>
120-
<CWidgetA
120+
<CWidgetStatsA
121121
className="mb-4"
122122
color="info"
123123
value={<>$9.000 <span className="fs-6 fw-normal">(40.9% <CIcon icon={cilArrowTop} />)</span></>}
@@ -196,7 +196,7 @@ React Alert is prepared for any length of text, as well as an optional close but
196196
/>
197197
</CCol>
198198
<CCol sm={6}>
199-
<CWidgetA
199+
<CWidgetStatsA
200200
className="mb-4"
201201
color="warning"
202202
value={<>$9.000 <span className="fs-6 fw-normal">(40.9% <CIcon icon={cilArrowTop} />)</span></>}
@@ -262,7 +262,7 @@ React Alert is prepared for any length of text, as well as an optional close but
262262
/>
263263
</CCol>
264264
<CCol sm={6}>
265-
<CWidgetA
265+
<CWidgetStatsA
266266
className="mb-4"
267267
color="danger"
268268
value={<>$9.000 <span className="fs-6 fw-normal">(40.9% <CIcon icon={cilArrowTop} />)</span></>}
@@ -349,20 +349,20 @@ React Alert is prepared for any length of text, as well as an optional close but
349349
</CRow>
350350
</Playground>
351351

352-
## CWidgetB
352+
## CWidgetStatsB
353353

354354
<Playground>
355355
<CRow>
356356
<CCol xs={6}>
357-
<CWidgetB
357+
<CWidgetStatsB
358358
className="mb-3"
359359
progress={{ color: 'success', value: 75 }}
360360
text="Widget helper text"
361361
title="Widget title"
362362
value="89.9%"/>
363363
</CCol>
364364
<CCol xs={6}>
365-
<CWidgetB
365+
<CWidgetStatsB
366366
className="mb-3"
367367
color="primary"
368368
inverse
@@ -374,12 +374,12 @@ React Alert is prepared for any length of text, as well as an optional close but
374374
</CRow>
375375
</Playground>
376376

377-
## CWidgetC
377+
## CWidgetStatsC
378378

379379
<Playground>
380380
<CRow>
381381
<CCol xs={6}>
382-
<CWidgetC
382+
<CWidgetStatsC
383383
className="mb-3"
384384
icon={<CIcon icon={cilChartPie} height={36} />}
385385
progress={{ color: 'success', value: 75 }}
@@ -388,7 +388,7 @@ React Alert is prepared for any length of text, as well as an optional close but
388388
value="89.9%"/>
389389
</CCol>
390390
<CCol xs={6}>
391-
<CWidgetC
391+
<CWidgetStatsC
392392
className="mb-3"
393393
icon={<CIcon icon={cilChartPie} height={36} />}
394394
color="primary"
@@ -401,12 +401,12 @@ React Alert is prepared for any length of text, as well as an optional close but
401401
</CRow>
402402
</Playground>
403403

404-
## CWidgetD
404+
## CWidgetStatsD
405405

406406
<Playground>
407407
<CRow>
408408
<CCol xs={6}>
409-
<CWidgetD
409+
<CWidgetStatsD
410410
className="mb-3"
411411
icon={<CIcon className="my-4 text-white" icon={cibFacebook} height={52} />}
412412
chart={
@@ -461,7 +461,7 @@ React Alert is prepared for any length of text, as well as an optional close but
461461
]}/>
462462
</CCol>
463463
<CCol xs={6}>
464-
<CWidgetD
464+
<CWidgetStatsD
465465
className="mb-3"
466466
icon={<CIcon className="my-4 text-white" icon={cibTwitter} height={52} />}
467467
chart={
@@ -518,12 +518,12 @@ React Alert is prepared for any length of text, as well as an optional close but
518518
</CRow>
519519
</Playground>
520520

521-
## CWidgetE
521+
## CWidgetStatsE
522522

523523
<Playground>
524524
<CRow>
525525
<CCol xs={6}>
526-
<CWidgetE
526+
<CWidgetStatsE
527527
className="mb-3"
528528
chart={
529529
<CChartBar
@@ -562,7 +562,7 @@ React Alert is prepared for any length of text, as well as an optional close but
562562
value="89.9%"/>
563563
</CCol>
564564
<CCol xs={6}>
565-
<CWidgetE
565+
<CWidgetStatsE
566566
className="mb-3"
567567
chart={
568568
<CChartLine
@@ -611,20 +611,20 @@ React Alert is prepared for any length of text, as well as an optional close but
611611
</CRow>
612612
</Playground>
613613

614-
## CWidgetF
614+
## CWidgetStatsF
615615

616616
<Playground>
617617
<CRow>
618618
<CCol xs={6}>
619-
<CWidgetF
619+
<CWidgetStatsF
620620
className="mb-3"
621621
color="primary"
622622
icon={<CIcon icon={cilChartPie} height={24} />}
623623
title="Widget title"
624624
value="89.9%"/>
625625
</CCol>
626626
<CCol xs={6}>
627-
<CWidgetF
627+
<CWidgetStatsF
628628
className="mb-3"
629629
color="warning"
630630
icon={<CIcon icon={cilChartPie} height={24} />}
@@ -634,7 +634,7 @@ React Alert is prepared for any length of text, as well as an optional close but
634634
</CRow>
635635
<CRow>
636636
<CCol xs={6}>
637-
<CWidgetF
637+
<CWidgetStatsF
638638
className="mb-3"
639639
color="primary"
640640
icon={<CIcon icon={cilChartPie} height={24} />}
@@ -643,7 +643,7 @@ React Alert is prepared for any length of text, as well as an optional close but
643643
value="89.9%"/>
644644
</CCol>
645645
<CCol xs={6}>
646-
<CWidgetF
646+
<CWidgetStatsF
647647
className="mb-3"
648648
color="warning"
649649
icon={<CIcon icon={cilChartPie} height={24} />}
@@ -654,7 +654,7 @@ React Alert is prepared for any length of text, as well as an optional close but
654654
</CRow>
655655
<CRow>
656656
<CCol xs={6}>
657-
<CWidgetF
657+
<CWidgetStatsF
658658
className="mb-3"
659659
color="primary"
660660
footer={
@@ -673,7 +673,7 @@ React Alert is prepared for any length of text, as well as an optional close but
673673
value="89.9%"/>
674674
</CCol>
675675
<CCol xs={6}>
676-
<CWidgetF
676+
<CWidgetStatsF
677677
className="mb-3"
678678
color="warning"
679679
footer={
@@ -696,26 +696,26 @@ React Alert is prepared for any length of text, as well as an optional close but
696696

697697
## API
698698

699-
### CWidgetA
699+
### CWidgetStatsA
700700

701-
<Props of={CWidgetA} />
701+
<Props of={CWidgetStatsA} />
702702

703-
### CWidgetB
703+
### CWidgetStatsB
704704

705-
<Props of={CWidgetB} />
705+
<Props of={CWidgetStatsB} />
706706

707-
### CWidgetC
707+
### CWidgetStatsC
708708

709-
<Props of={CWidgetC} />
709+
<Props of={CWidgetStatsC} />
710710

711-
### CWidgetD
711+
### CWidgetStatsD
712712

713-
<Props of={CWidgetD} />
713+
<Props of={CWidgetStatsD} />
714714

715-
### CWidgetE
715+
### CWidgetStatsE
716716

717-
<Props of={CWidgetE} />
717+
<Props of={CWidgetStatsE} />
718718

719-
### CWidgetF
719+
### CWidgetStatsF
720720

721-
<Props of={CWidgetF} />
721+
<Props of={CWidgetStatsF} />

src/components/widgets/CWidgetA.tsx renamed to src/components/widgets/CWidgetStatsA.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Colors, colorPropType } from '../Types'
77
import { CCard } from '../card/CCard'
88
import { CCardBody } from '../card/CCardBody'
99

10-
export interface CWidgetAProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
10+
export interface CWidgetStatsAProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
1111
/**
1212
* Action node for your component. [docs]
1313
*/
@@ -36,7 +36,7 @@ export interface CWidgetAProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
3636
value?: string | number | ReactNode
3737
}
3838

39-
export const CWidgetA = forwardRef<HTMLDivElement, CWidgetAProps>(
39+
export const CWidgetStatsA = forwardRef<HTMLDivElement, CWidgetStatsAProps>(
4040
({ action, chart, className, color, title, value, ...rest }, ref) => {
4141
const _className = classNames(
4242
{ [`bg-${color}`]: color, 'text-high-emphasis-inverse': color },
@@ -58,7 +58,7 @@ export const CWidgetA = forwardRef<HTMLDivElement, CWidgetAProps>(
5858
},
5959
)
6060

61-
CWidgetA.propTypes = {
61+
CWidgetStatsA.propTypes = {
6262
action: PropTypes.node,
6363
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
6464
className: PropTypes.string,
@@ -67,4 +67,4 @@ CWidgetA.propTypes = {
6767
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
6868
}
6969

70-
CWidgetA.displayName = 'CWidgetA'
70+
CWidgetStatsA.displayName = 'CWidgetStatsA'

src/components/widgets/CWidgetB.tsx renamed to src/components/widgets/CWidgetStatsB.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { CCard } from '../card/CCard'
77
import { CCardBody } from '../card/CCardBody'
88
import { CProgress, CProgressProps } from '../progress/CProgress'
99

10-
export interface CWidgetBProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
10+
export interface CWidgetStatsBProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
1111
/**
1212
* A string of all className you want applied to the base component. [docs]
1313
*/
@@ -42,7 +42,7 @@ export interface CWidgetBProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
4242
value?: string | number | ReactNode
4343
}
4444

45-
export const CWidgetB = forwardRef<HTMLDivElement, CWidgetBProps>(
45+
export const CWidgetStatsB = forwardRef<HTMLDivElement, CWidgetStatsBProps>(
4646
({ className, color, inverse, progress, text, title, value, ...rest }, ref) => {
4747
return (
4848
<CCard
@@ -67,7 +67,7 @@ export const CWidgetB = forwardRef<HTMLDivElement, CWidgetBProps>(
6767
},
6868
)
6969

70-
CWidgetB.propTypes = {
70+
CWidgetStatsB.propTypes = {
7171
className: PropTypes.string,
7272
color: colorPropType,
7373
inverse: PropTypes.bool,
@@ -77,4 +77,4 @@ CWidgetB.propTypes = {
7777
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
7878
}
7979

80-
CWidgetB.displayName = 'CWidgetCWidgetB'
80+
CWidgetStatsB.displayName = 'CWidgetCWidgetStatsB'

src/components/widgets/CWidgetC.tsx renamed to src/components/widgets/CWidgetStatsC.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { CCard } from '../card/CCard'
77
import { CCardBody } from '../card/CCardBody'
88
import { CProgress, CProgressProps } from '../progress/CProgress'
99

10-
export interface CWidgetCProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
10+
export interface CWidgetStatsCProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
1111
/**
1212
* A string of all className you want applied to the base component. [docs]
1313
*/
@@ -42,7 +42,7 @@ export interface CWidgetCProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
4242
value?: string | number | ReactNode
4343
}
4444

45-
export const CWidgetC = forwardRef<HTMLDivElement, CWidgetCProps>(
45+
export const CWidgetStatsC = forwardRef<HTMLDivElement, CWidgetStatsCProps>(
4646
({ className, color, icon, inverse, progress, title, value, ...rest }, ref) => {
4747
return (
4848
<CCard
@@ -80,7 +80,7 @@ export const CWidgetC = forwardRef<HTMLDivElement, CWidgetCProps>(
8080
},
8181
)
8282

83-
CWidgetC.propTypes = {
83+
CWidgetStatsC.propTypes = {
8484
className: PropTypes.string,
8585
color: colorPropType,
8686
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
@@ -90,4 +90,4 @@ CWidgetC.propTypes = {
9090
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
9191
}
9292

93-
CWidgetC.displayName = 'CWidgetCWidgetC'
93+
CWidgetStatsC.displayName = 'CWidgetStatsCWidgetStatsC'

src/components/widgets/CWidgetD.tsx renamed to src/components/widgets/CWidgetStatsD.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { forwardRef, HTMLAttributes, ReactNode, useMemo } from 'react'
1+
import React, { forwardRef, HTMLAttributes, ReactNode } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44

@@ -14,7 +14,7 @@ type Value = {
1414
value?: number | string | ReactNode
1515
}
1616

17-
export interface CWidgetDProps extends HTMLAttributes<HTMLDivElement> {
17+
export interface CWidgetStatsDProps extends HTMLAttributes<HTMLDivElement> {
1818
/**
1919
* A string of all className you want applied to the base component. [docs]
2020
*/
@@ -39,7 +39,7 @@ export interface CWidgetDProps extends HTMLAttributes<HTMLDivElement> {
3939
values?: Value[]
4040
}
4141

42-
export const CWidgetD = forwardRef<HTMLDivElement, CWidgetDProps>(
42+
export const CWidgetStatsD = forwardRef<HTMLDivElement, CWidgetStatsDProps>(
4343
({ className, chart, color, icon, values, ...rest }, ref) => {
4444
const _className = classNames(className)
4545
const classNameHeader = classNames(
@@ -74,12 +74,12 @@ export const CWidgetD = forwardRef<HTMLDivElement, CWidgetDProps>(
7474
},
7575
)
7676

77-
CWidgetD.propTypes = {
77+
CWidgetStatsD.propTypes = {
7878
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
7979
className: PropTypes.string,
8080
color: colorPropType,
8181
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
8282
values: PropTypes.arrayOf(PropTypes.any),
8383
}
8484

85-
CWidgetD.displayName = 'CWidgetD'
85+
CWidgetStatsD.displayName = 'CWidgetStatsD'

0 commit comments

Comments
 (0)