diff --git a/src/lib/gradients.ts b/src/lib/gradients.ts new file mode 100644 index 0000000..300c9ac --- /dev/null +++ b/src/lib/gradients.ts @@ -0,0 +1,29 @@ +import { gradients } from './colors'; + +export const getGradientStyle = (type: keyof typeof gradients) => { + return { + background: gradients[type], + }; +}; + +export const getGlowStyle = (color: 'blue' | 'purple', opacity: number = 0.15) => { + const colorValue = color === 'blue' ? '0, 217, 255' : '168, 85, 247'; + return { + background: `radial-gradient(circle, rgba(${colorValue}, ${opacity}) 0%, transparent 70%)`, + }; +}; + +export const getBorderGradientStyle = () => { + return { + borderImage: `${gradients.primary} 1`, + }; +}; + +export const getTextGradientStyle = () => { + return { + background: gradients.primary, + WebkitBackgroundClip: 'text', + WebkitTextFillColor: 'transparent', + backgroundClip: 'text', + }; +};