File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,17 +2,22 @@ import React from 'react'
22import PropTypes from 'prop-types'
33import './style.css'
44
5- export default function Hourglass ( { color, className, style } ) {
5+ export default function Hourglass ( { color, size , className, style } ) {
66 return (
77 < div className = { `lds-hourglass ${ className } ` } style = { { ...style } } >
8- < div className = "lds-hourglass-after" style = { { background : color } } > </ div >
8+ < div
9+ className = "lds-hourglass-after"
10+ style = { { background : color , 'border-width' : size , 'border-height' : size } }
11+ > </ div >
912 </ div >
1013 )
1114}
1215
1316Hourglass . propTypes = {
1417 /** hex color */
1518 color : PropTypes . string ,
19+ /** size in pixel */
20+ size : PropTypes . number ,
1621 /** class name */
1722 className : PropTypes . string ,
1823 /** style object */
@@ -22,5 +27,6 @@ Hourglass.propTypes = {
2227Hourglass . defaultProps = {
2328 color : '#7f58af' ,
2429 className : '' ,
30+ size : 32 ,
2531 style : { } ,
2632}
You can’t perform that action at this time.
0 commit comments