UNPKG

@re-flex/ui

Version:
13 lines (12 loc) 540 B
import { parseColor, styled } from "@re-flex/styles"; const Divider = styled("div")(({ strong = 1, spacing = 0, color = "divider", direction = "horizontal", }) => { const { primaryColor } = parseColor(color); return { display: "flex", width: direction === "vertical" ? strong + "px" : "100%", height: direction === "horizontal" ? strong + "px" : "100%", backgroundColor: primaryColor, [direction === "horizontal" ? "marginInline" : "marginBlock"]: spacing, }; }); export default Divider;