UNPKG

mytril

Version:

Mytril Svelte library component for rapidly building modern websites based on Svelte and Sveltekit

24 lines (23 loc) 685 B
import { x11Colors } from './utils/x11.js'; export function getAssets() { return { shape(params) { if (params) { if (params === 'none') return 'rounded-0'; return `rounded-${params}`; } }, color(color) { if (color) { if (color.includes('#') || color.includes('rgb') || color.includes('rgba') || color.includes('oklch') || x11Colors.has(color.toLowerCase())) return color; return `var(--color-${color})`; } } }; }