UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

1 lines 2.61 kB
{"version":3,"sources":["../../../src/components/layout-and-navigation/VerticalDivider.tsx"],"sourcesContent":["export type VerticalDividerProps = {\n width?: number,\n height?: number,\n strokeWidth?: number,\n dashGap?: number,\n dashLength?: number,\n}\n\n/**\n * A Component for creating a vertical Divider\n */\nexport const VerticalDivider = ({\n width = 1,\n height = 100,\n strokeWidth = 4,\n dashGap = 4,\n dashLength = 4,\n }: VerticalDividerProps) => {\n return (\n <div style={{ width: width + 'px', height: height + 'px' }}>\n <svg width={width} height={height} viewBox={`0 0 ${width} ${height}`} fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <line\n opacity=\"0.5\"\n x1={width / 2}\n y1={height}\n x2={width / 2}\n y2=\"0\"\n stroke=\"url(#paint_linear)\"\n strokeWidth={strokeWidth}\n strokeDasharray={`${dashLength} ${dashLength + dashGap}`}\n strokeLinecap=\"round\"\n />\n <defs>\n <linearGradient\n id=\"paint_linear\"\n x1={width / 2}\n y1=\"0\"\n x2={width / 2}\n y2={height}\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopOpacity=\"0\" stopColor=\"currentColor\"/>\n <stop offset=\"0.5\" stopColor=\"currentColor\"/>\n <stop offset=\"1\" stopColor=\"currentColor\" stopOpacity=\"0\"/>\n </linearGradient>\n </defs>\n </svg>\n </div>\n )\n}\n"],"mappings":";AAsBQ,cAYE,YAZF;AAXD,IAAM,kBAAkB,CAAC;AAAA,EACE,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,cAAc;AAAA,EACd,UAAU;AAAA,EACV,aAAa;AACf,MAA4B;AAC1D,SACE,oBAAC,SAAI,OAAO,EAAE,OAAO,QAAQ,MAAM,QAAQ,SAAS,KAAK,GACvD;AAAA,IAAC;AAAA;AAAA,MAAI;AAAA,MAAc;AAAA,MAAgB,SAAS,OAAO,KAAK,IAAI,MAAM;AAAA,MAAI,MAAK;AAAA,MACtE,OAAM;AAAA,MACT;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,SAAQ;AAAA,YACR,IAAI,QAAQ;AAAA,YACZ,IAAI;AAAA,YACJ,IAAI,QAAQ;AAAA,YACZ,IAAG;AAAA,YACH,QAAO;AAAA,YACP;AAAA,YACA,iBAAiB,GAAG,UAAU,IAAI,aAAa,OAAO;AAAA,YACtD,eAAc;AAAA;AAAA,QAChB;AAAA,QACA,oBAAC,UACC;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAI,QAAQ;AAAA,YACZ,IAAG;AAAA,YACH,IAAI,QAAQ;AAAA,YACZ,IAAI;AAAA,YACJ,eAAc;AAAA,YAEd;AAAA,kCAAC,UAAK,aAAY,KAAI,WAAU,gBAAc;AAAA,cAC9C,oBAAC,UAAK,QAAO,OAAM,WAAU,gBAAc;AAAA,cAC3C,oBAAC,UAAK,QAAO,KAAI,WAAU,gBAAe,aAAY,KAAG;AAAA;AAAA;AAAA,QAC3D,GACF;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}