File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ Component that accepts `size` prop have a default size in pixel.
3636| ` <Default/> ` | ` #7f58af ` | - | ` "" ` | ` {} ` |
3737| ` <DualRing/> ` | ` #7f58af ` | ` 80 ` | ` "" ` | ` {} ` |
3838| ` <Ellipsis/> ` | ` #7f58af ` | - | ` "" ` | ` {} ` |
39- | ` <Facebook/> ` | ` #7f58af ` | - | ` "" ` | ` {} ` |
39+ | ` <Facebook/> ` | ` #7f58af ` | ` 80 ` | ` "" ` | ` {} ` |
4040| ` <Grid/> ` | ` #7f58af ` | - | ` "" ` | ` {} ` |
4141| ` <Heart/> ` | ` #7f58af ` | ` 80 ` | ` "" ` | ` {} ` |
4242| ` <Hourglass/> ` | ` #7f58af ` | - | ` "" ` | ` {} ` |
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ import React from 'react'
22import PropTypes from 'prop-types'
33import './style.css'
44
5- export default function Facebook ( { color, className, style } ) {
5+ export default function Facebook ( { color, className, style, size } ) {
66 const circles = [ ...Array ( 3 ) ] . map ( ( _ , index ) => < div key = { index } style = { { background : `${ color } ` } } > </ div > )
77
88 return (
9- < div className = { `lds-facebook ${ className } ` } style = { { ...style } } >
9+ < div className = { `lds-facebook ${ className } ` } style = { { width : size , height : size , ...style } } >
1010 { circles }
1111 </ div >
1212 )
@@ -19,10 +19,13 @@ Facebook.propTypes = {
1919 className : PropTypes . string ,
2020 /** style object */
2121 style : PropTypes . object ,
22+ /** size in pixel */
23+ size : PropTypes . number ,
2224}
2325
2426Facebook . defaultProps = {
2527 color : '#7f58af' ,
2628 className : '' ,
2729 style : { } ,
30+ size : 80 ,
2831}
Original file line number Diff line number Diff line change 77 .lds-facebook div {
88 display : inline-block;
99 position : absolute;
10- left : 8 px ;
11- width : 16 px ;
10+ left : 10 % ;
11+ width : 20 % ;
1212 background : # fff ;
1313 animation : lds-facebook 1.2s cubic-bezier (0 , 0.5 , 0.5 , 1 ) infinite;
1414 }
1515 .lds-facebook div : nth-child (1 ) {
16- left : 8 px ;
16+ left : 10 % ;
1717 animation-delay : -0.24s ;
1818 }
1919 .lds-facebook div : nth-child (2 ) {
20- left : 32 px ;
20+ left : 40 % ;
2121 animation-delay : -0.12s ;
2222 }
2323 .lds-facebook div : nth-child (3 ) {
24- left : 56 px ;
24+ left : 70 % ;
2525 animation-delay : 0 ;
2626 }
2727 @keyframes lds-facebook {
2828 0% {
29- top : 8 px ;
30- height : 64 px ;
29+ top : 10 % ;
30+ height : 80 % ;
3131 }
3232 50% , 100% {
33- top : 24 px ;
34- height : 32 px ;
33+ top : 30 % ;
34+ height : 40 % ;
3535 }
36- }
36+ }
Original file line number Diff line number Diff line change @@ -143,6 +143,11 @@ const SizeProp = () => {
143143 < Heart color = "#be97e8" size = { 20 } />
144144 </ div >
145145 < div className = "block" >
146+ < Facebook color = "#be97e8" />
147+ < Facebook color = "#be97e8" size = { 40 } />
148+ < Facebook color = "#be97e8" size = { 20 } />
149+ </ div >
150+ < div className = "block" >
146151 < Ripple color = "#be97e8" />
147152 < Ripple color = "#be97e8" size = { 40 } />
148153 < Ripple color = "#be97e8" size = { 20 } />
You can’t perform that action at this time.
0 commit comments