Skip to content

Commit b584416

Browse files
committed
feat(CProgress): add thin variant
1 parent 7ff8048 commit b584416

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/components/progress/CProgress.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,27 @@ export interface CProgressProps
1616
* @default 'undefined'
1717
*/
1818
height?: number
19+
/**
20+
* Makes progress bar thinner. [docs]
21+
*/
22+
thin?: boolean
23+
/**
24+
* The percent to progress the ProgressBar (out of 100). [docs]
25+
* @default 0
26+
*/
27+
value?: number
1928
/**
2029
* Change the default color to white. [docs]
2130
*/
2231
white?: boolean
2332
}
2433

2534
export const CProgress = forwardRef<HTMLDivElement, CProgressProps>(
26-
({ children, className, height, value, white, ...rest }, ref) => {
35+
({ children, className, height, thin, value = 0, white, ...rest }, ref) => {
2736
const _className = classNames(
2837
'progress',
2938
{
39+
'progress-thin': thin,
3040
'progress-white': white,
3141
},
3242
className,
@@ -50,6 +60,7 @@ CProgress.propTypes = {
5060
children: PropTypes.node,
5161
className: PropTypes.string,
5262
height: PropTypes.number,
63+
thin: PropTypes.bool,
5364
value: PropTypes.number,
5465
white: PropTypes.bool,
5566
}

0 commit comments

Comments
 (0)