mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-09 11:19:59 -06:00
Fixed Bar component
Moved width prop from direct prop to sx prop, updated PropTypes to accept string|object.
This commit is contained in:
@@ -23,10 +23,10 @@ const Bar = ({ width, height, backgroundColor, borderRadius, children }) => {
|
||||
return (
|
||||
<Box
|
||||
position="relative"
|
||||
width={width}
|
||||
height={height}
|
||||
backgroundColor={backgroundColor}
|
||||
sx={{
|
||||
width: width,
|
||||
borderRadius: borderRadius || theme.spacing(1.5),
|
||||
}}
|
||||
>
|
||||
@@ -36,7 +36,7 @@ const Bar = ({ width, height, backgroundColor, borderRadius, children }) => {
|
||||
};
|
||||
|
||||
Bar.propTypes = {
|
||||
width: PropTypes.string.isRequired,
|
||||
width: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
|
||||
height: PropTypes.string.isRequired,
|
||||
backgroundColor: PropTypes.string.isRequired,
|
||||
borderRadius: PropTypes.string,
|
||||
|
||||
Reference in New Issue
Block a user