beatufitull front end for ozone modration ,, wit catpucoin and ebergarden !
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 66 lines 1.9 kB view raw
1import type { InputAccentColor } from '../stores/ui'; 2 3/** 4 * All of the Tailwind utility classes we use when the accent colour changes. 5 * Keeping them in one place makes it easier to ensure the JIT compiler sees 6 * every possible combination and avoids dynamic string interpolation in 7 * templates. 8 */ 9export const accentClasses: Record< 10 InputAccentColor, 11 { 12 bg: string; 13 border: string; 14 text: string; 15 ring: string; 16 focusBorder: string; 17 focusRing: string; 18 } 19> = { 20 sapphire: { 21 bg: 'bg-ctp-sapphire', 22 border: 'border-ctp-sapphire', 23 text: 'text-ctp-sapphire', 24 ring: 'ring-ctp-sapphire', 25 focusBorder: 'focus:border-ctp-sapphire', 26 focusRing: 'focus:ring-ctp-sapphire', 27 }, 28 mauve: { 29 bg: 'bg-ctp-mauve', 30 border: 'border-ctp-mauve', 31 text: 'text-ctp-mauve', 32 ring: 'ring-ctp-mauve', 33 focusBorder: 'focus:border-ctp-mauve', 34 focusRing: 'focus:ring-ctp-mauve', 35 }, 36 lavender: { 37 bg: 'bg-ctp-lavender', 38 border: 'border-ctp-lavender', 39 text: 'text-ctp-lavender', 40 ring: 'ring-ctp-lavender', 41 focusBorder: 'focus:border-ctp-lavender', 42 focusRing: 'focus:ring-ctp-lavender', 43 } 44}; 45 46/** 47 * Small helpers that make the call sites a little more ergonomic. 48 */ 49export function bgAccent(color: InputAccentColor) { 50 return accentClasses[color].bg; 51} 52export function borderAccent(color: InputAccentColor) { 53 return accentClasses[color].border; 54} 55export function textAccent(color: InputAccentColor) { 56 return accentClasses[color].text; 57} 58export function ringAccent(color: InputAccentColor) { 59 return accentClasses[color].ring; 60} 61export function focusBorderAccent(color: InputAccentColor) { 62 return accentClasses[color].focusBorder; 63} 64export function focusRingAccent(color: InputAccentColor) { 65 return accentClasses[color].focusRing; 66}