UNPKG

@teamsparta/stack-divider

Version:
22 lines (20 loc) 556 B
// src/Divider.style.ts import { css } from "@emotion/react"; function getDividerStyle(size, color, orientation, isFlexItem) { const orientationStyle = orientation === "horizontal" ? css` width: 100%; border-top: ${size}px solid ${color}; ` : css` height: ${isFlexItem ? "auto" : "100%"}; border-left: ${size}px solid ${color}; align-self: ${isFlexItem ? "stretch" : "auto"}; `; return css` border: none; margin: 0; ${orientationStyle} `; } export { getDividerStyle };