Skip to content

Commit c420063

Browse files
committed
fix(CProgress): custom variant validator issue
1 parent 82e7583 commit c420063

File tree

2 files changed

+2
-58
lines changed

2 files changed

+2
-58
lines changed

src/components/progress/CProgress.ts

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -5,68 +5,12 @@ import { CProgressBar } from './CProgressBar'
55
const CProgress = defineComponent({
66
name: 'CProgress',
77
props: {
8-
/**
9-
* Use to animate the stripes right to left via CSS3 animations.
10-
*/
11-
animated: {
12-
type: Boolean,
13-
required: false,
14-
},
15-
/**
16-
* Sets the color context of the component to one of CoreUI’s themed colors.
17-
*
18-
* @default 'primary'
19-
* @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
20-
*/
21-
color: {
22-
type: String,
23-
default: 'primary',
24-
require: false,
25-
validator: (value: string) => {
26-
return [
27-
'primary',
28-
'secondary',
29-
'success',
30-
'danger',
31-
'warning',
32-
'info',
33-
'dark',
34-
'light',
35-
].includes(value)
36-
},
37-
},
38-
// TODO: check how to use defualt HTMLAttributes
39-
/**
40-
* Set the height of component.
41-
*/
428
height: {
439
type: Number,
4410
default: undefined,
4511
required: false,
4612
},
47-
/**
48-
* The percent to progress the ProgressBar.
49-
*
50-
* @default 0
51-
*/
52-
value: {
53-
type: Number,
54-
required: false,
55-
default: 0,
56-
},
57-
/**
58-
* Set the progress bar variant to optional striped.
59-
*
60-
* @values 'striped'
61-
*/
62-
variant: {
63-
type: String,
64-
default: 'primary',
65-
require: false,
66-
validator: (value: string) => {
67-
return value === 'striped'
68-
},
69-
},
13+
...CProgressBar.props,
7014
},
7115
setup(props, { slots }) {
7216
return () =>

src/components/progress/CProgressBar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const CProgressBar = defineComponent({
5050
*/
5151
variant: {
5252
type: String,
53-
default: 'primary',
53+
default: undefined,
5454
require: false,
5555
validator: (value: string) => {
5656
return value === 'striped'

0 commit comments

Comments
 (0)