Skip to content

Commit 663c6b5

Browse files
committed
update linearGradient
1 parent 2d5aca8 commit 663c6b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@react-spectrum/s2/style/spectrum-theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export function colorMix(a: SpectrumColor, b: SpectrumColor, percent: number): `
114114
}
115115

116116
export function linearGradient(angle: string, ...gradientTokens: [(keyof typeof tokens), (keyof typeof tokens)][]): string {
117-
return `linear-gradient(${angle}, ${gradientTokens.map(([color, stop]) => `${getToken(color)} ${parseFloat(getToken(stop)) * 100}%`)})`;
117+
return `linear-gradient(${angle}, ${gradientTokens.map(([color, stop]) => `${getToken(color as keyof typeof tokens)} ${parseFloat(getToken(stop as keyof typeof tokens)) * 100}%`)})`;
118118
}
119119

120120
function generateSpacing<K extends number[]>(px: K): {[P in K[number]]: string} {

0 commit comments

Comments
 (0)