UNPKG

retro-react

Version:

A React component library for building retro-style websites

2 lines (1 loc) 780 B
import{__rest as o}from"../../_virtual/_tslib.js";import{forwardRef as t}from"react";import{jsx as i}from"../../node_modules/@theme-ui/core/jsx-runtime/dist/theme-ui-core-jsx-runtime.esm.js";import{getColorGradientOptions as r}from"../../utils/getColorGradients.js";const e=t(((t,e)=>{var{sx:n,orientation:s="horizontal",color:a="primary",flexItem:m=!1}=t,l=o(t,["sx","orientation","color","flexItem"]);const d=r(a),c=d.length>1;return i("div",Object.assign({},l,{ref:e,sx:Object.assign({width:"vertical"===s?"2px":"100%",height:"horizontal"===s?"2px":"100%",background:c?void 0:d[0],backgroundImage:c?`linear-gradient(${"horizontal"===s?"to right":"to bottom"}, ${d.join(", ")})`:void 0,alignSelf:m?"stretch":void 0},n)}),void 0)}));e.displayName="Divider";export{e as Divider};