refactor: 更新渐变定义为医疗健康风格

This commit is contained in:
张翔
2026-02-23 00:07:08 +08:00
parent 83bed14292
commit afdd7a5456
+20 -4
View File
@@ -6,8 +6,12 @@ export const getGradientStyle = (type: keyof typeof gradients) => {
}; };
}; };
export const getGlowStyle = (color: 'blue' | 'purple', opacity: number = 0.15) => { export const getGlowStyle = (color: 'primary' | 'brand', opacity: number = 0.1) => {
const colorValue = color === 'blue' ? '0, 217, 255' : '168, 85, 247'; const colorMap = {
primary: '0, 94, 184',
brand: '196, 30, 58',
};
const colorValue = colorMap[color];
return { return {
background: `radial-gradient(circle, rgba(${colorValue}, ${opacity}) 0%, transparent 70%)`, background: `radial-gradient(circle, rgba(${colorValue}, ${opacity}) 0%, transparent 70%)`,
}; };
@@ -19,11 +23,23 @@ export const getBorderGradientStyle = () => {
}; };
}; };
export const getTextGradientStyle = () => { export const getTextGradientStyle = (type: 'primary' | 'brand' = 'primary') => {
return { return {
background: gradients.primary, background: gradients[type],
WebkitBackgroundClip: 'text', WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent', WebkitTextFillColor: 'transparent',
backgroundClip: 'text', backgroundClip: 'text',
}; };
}; };
export const getHeroGradientStyle = () => {
return {
background: gradients.hero,
};
};
export const getCTAGradientStyle = () => {
return {
background: gradients.cta,
};
};