Files
grungnet/src/components/Divider.js

27 lines
535 B
JavaScript
Raw Normal View History

import React from "react";
import { Divider } from "theme-ui";
2020-05-31 16:24:17 +10:00
function StyledDivider({ vertical, color, fill }) {
return (
<Divider
my={vertical ? 0 : 2}
mx={vertical ? 2 : 0}
2020-05-26 14:47:37 +10:00
bg={color}
sx={{
2020-05-31 16:24:17 +10:00
height: vertical ? (fill ? "100%" : "24px") : "2px",
width: vertical ? "2px" : fill ? "100%" : "24px",
borderRadius: "2px",
opacity: 0.5,
}}
/>
);
}
StyledDivider.defaultProps = {
vertical: false,
2020-05-26 14:47:37 +10:00
color: "text",
2020-05-31 16:24:17 +10:00
fill: false,
};
export default StyledDivider;