UNPKG

retro-react

Version:

A React component library for building retro-style websites

2 lines (1 loc) 704 B
import{jsxs as e,jsx as t}from"react/jsx-runtime";import i from"react";const s=i.memo((i=>{let{$top:s,$left:o,$width:n,$height:r,$color:a,$visible:d}=i;const l={position:"absolute",top:s,left:o,width:n,height:`${r+2}px`,backgroundColor:a},g=Object.assign(Object.assign({},l),{transform:"rotate(-45deg) skewX(22.5deg) skewY(22.5deg)"}),c=Object.assign(Object.assign({},l),{transform:"rotate(45deg) skewX(22.5deg) skewY(22.5deg)"});return e("span",Object.assign({style:{position:"relative",width:n,visibility:d?"visible":"hidden",transition:"visibility 0.5s",userSelect:"none",pointerEvents:"none"}},{children:[t("span",{style:g},void 0),t("span",{style:c},void 0)]}),void 0)}));export{s as TrailingStar};