File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,10 @@ Item.propTypes = {
105
105
titleLink : PropTypes . string ,
106
106
withButtonLink : PropTypes . bool ,
107
107
withTitleLink : PropTypes . bool ,
108
- width : PropTypes . string ,
108
+ width : PropTypes . oneOfType ( [
109
+ PropTypes . string , // allows percentages
110
+ PropTypes . number , // uses pixels
111
+ ] ) ,
109
112
}
110
113
111
114
Item . defaultProps = {
@@ -121,7 +124,7 @@ Item.defaultProps = {
121
124
titleLink : '' ,
122
125
withButtonLink : false ,
123
126
withTitleLink : false ,
124
- width : '' ,
127
+ width : 'auto ' ,
125
128
}
126
129
127
130
export default Item
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const CardBodyLoading = ({ withButtonLink }) => (
25
25
26
26
const ItemLoading = ( { orientation, width, withButtonLink } ) => (
27
27
orientation === 'horizontal' ? (
28
- < Card style = { { width : ` ${ width } ` } } className = 'h-100 mb-4' >
28
+ < Card style = { { width } } className = 'h-100 mb-4' >
29
29
< div className = 'row g-0 h-100' >
30
30
< div className = 'col-3 bg-secondary' />
31
31
< div className = 'col-9 d-flex align-items-center' >
@@ -51,12 +51,15 @@ CardBodyLoading.defaultProps = {
51
51
52
52
ItemLoading . propTypes = {
53
53
orientation : PropTypes . oneOf ( [ 'horizontal' , 'vertical' ] ) ,
54
- width : PropTypes . string ,
54
+ width : PropTypes . oneOfType ( [
55
+ PropTypes . string , // allows percentages
56
+ PropTypes . number , // uses pixels
57
+ ] ) ,
55
58
}
56
59
57
60
ItemLoading . defaultProps = {
58
61
orientation : 'vertical' ,
59
- width : '' ,
62
+ width : 'auto ' ,
60
63
}
61
64
62
65
export default ItemLoading
You can’t perform that action at this time.
0 commit comments