46 lines
1012 B
TypeScript
46 lines
1012 B
TypeScript
import { gradients } from './colors';
|
|
|
|
export const getGradientStyle = (type: keyof typeof gradients) => {
|
|
return {
|
|
background: gradients[type],
|
|
};
|
|
};
|
|
|
|
export const getGlowStyle = (color: 'primary' | 'brand', opacity: number = 0.1) => {
|
|
const colorMap = {
|
|
primary: '0, 94, 184',
|
|
brand: '196, 30, 58',
|
|
};
|
|
const colorValue = colorMap[color];
|
|
return {
|
|
background: `radial-gradient(circle, rgba(${colorValue}, ${opacity}) 0%, transparent 70%)`,
|
|
};
|
|
};
|
|
|
|
export const getBorderGradientStyle = () => {
|
|
return {
|
|
borderImage: `${gradients.primary} 1`,
|
|
};
|
|
};
|
|
|
|
export const getTextGradientStyle = (type: 'primary' | 'brand' = 'primary') => {
|
|
return {
|
|
background: gradients[type],
|
|
WebkitBackgroundClip: 'text',
|
|
WebkitTextFillColor: 'transparent',
|
|
backgroundClip: 'text',
|
|
};
|
|
};
|
|
|
|
export const getHeroGradientStyle = () => {
|
|
return {
|
|
background: gradients.hero,
|
|
};
|
|
};
|
|
|
|
export const getCTAGradientStyle = () => {
|
|
return {
|
|
background: gradients.cta,
|
|
};
|
|
};
|