File tree Expand file tree Collapse file tree 3 files changed +8
-28
lines changed Expand file tree Collapse file tree 3 files changed +8
-28
lines changed Original file line number Diff line number Diff line change @@ -31,30 +31,8 @@ Label.propTypes = {
31
31
PropTypes . string ,
32
32
PropTypes . arrayOf ( PropTypes . string ) ,
33
33
] ) ,
34
- type : PropTypes . oneOf ( [
35
- 'H_1' ,
36
- 'H_2' ,
37
- 'SUBTITLE_1' ,
38
- 'SUBTITLE_2' ,
39
- 'BODY_1' ,
40
- 'BODY_2' ,
41
- 'BUTTON_1' ,
42
- 'BUTTON_2' ,
43
- 'CAPTION_1' ,
44
- 'CAPTION_2' ,
45
- 'CAPTION_3' ,
46
- ] ) ,
47
- color : PropTypes . oneOf ( [
48
- 'ONBACKGROUND_1' ,
49
- 'ONBACKGROUND_2' ,
50
- 'ONBACKGROUND_3' ,
51
- 'ONBACKGROUND_4' ,
52
- 'ONCONTENT_1' ,
53
- 'ONCONTENT_2' ,
54
- 'PRIMARY' ,
55
- 'ERROR' ,
56
- 'SECONDARY_3' ,
57
- ] ) ,
34
+ type : PropTypes . string ,
35
+ color : PropTypes . string ,
58
36
children : PropTypes . oneOfType ( [
59
37
PropTypes . string ,
60
38
PropTypes . number ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export function changeTypographyToClassName(type) {
13
13
case Typography . CAPTION_1 : return 'sendbird-label--caption-1' ;
14
14
case Typography . CAPTION_2 : return 'sendbird-label--caption-2' ;
15
15
case Typography . CAPTION_3 : return 'sendbird-label--caption-3' ;
16
- default : return null ;
16
+ default : return '' ;
17
17
}
18
18
}
19
19
@@ -28,6 +28,6 @@ export function changeColorToClassName(color) {
28
28
case Colors . PRIMARY : return 'sendbird-label--color-primary' ; // should be Primary-3 fix me
29
29
case Colors . ERROR : return 'sendbird-label--color-error' ;
30
30
case Colors . SECONDARY_3 : return 'sendbird-label--color-secondary-3' ;
31
- default : return null ;
31
+ default : return '' ;
32
32
}
33
33
}
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ LinkLabel.propTypes = {
44
44
PropTypes . arrayOf ( PropTypes . string ) ,
45
45
] ) ,
46
46
src : PropTypes . string . isRequired ,
47
- type : PropTypes . oneOf ( Object . keys ( LabelTypography ) ) . isRequired ,
48
- color : PropTypes . oneOf ( Object . keys ( LabelColors ) ) . isRequired ,
47
+ type : PropTypes . string ,
48
+ color : PropTypes . string ,
49
49
children : PropTypes . oneOfType ( [
50
50
PropTypes . string ,
51
51
PropTypes . element ,
@@ -56,6 +56,8 @@ LinkLabel.propTypes = {
56
56
57
57
LinkLabel . defaultProps = {
58
58
className : '' ,
59
+ type : '' ,
60
+ color : '' ,
59
61
} ;
60
62
61
63
export const LinkLabelTypography = LabelTypography ;
You can’t perform that action at this time.
0 commit comments