MCPcopy Create free account
hub / github.com/api-platform/website / generateColors

Function generateColors

pwa/plugins/stroke-plugin.js:4–22  ·  view source on GitHub ↗
(e, colors, prefix)

Source from the content-addressed store, hash-verified

2const plugin = require("tailwindcss/plugin");
3
4const generateColors = (e, colors, prefix) =>
5 Object.keys(colors).reduce((acc, key) => {
6 if (typeof colors[key] === "string") {
7 return {
8 ...acc,
9 [`${prefix}-${e(key)}`]: {
10 "-webkit-text-stroke-color": colors[key],
11 "-webkit-text-fill-color": "transparent",
12 },
13 };
14 }
15
16 const innerColors = generateColors(e, colors[key], `${prefix}-${e(key)}`);
17
18 return {
19 ...acc,
20 ...innerColors,
21 };
22 }, {});
23
24const generateStrokeWidth = (e, borderWidths, prefix) =>
25 Object.keys(borderWidths).reduce((acc, key) => {

Callers 1

stroke-plugin.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected