fix(create): use inline styles for dynamic gradient backgrounds
Panda CSS's css() function doesn't properly interpolate dynamic gradient strings. Move background and boxShadow with theme.gradient values to inline style props for: - Top gradient bar (converted from _before pseudo to actual div) - Icon background - CTA button background 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
02463df8e5
commit
ed25b323e8
|
|
@ -73,17 +73,20 @@ function CreatorCard({
|
||||||
boxShadow: { base: '0 16px 50px rgba(0,0,0,0.2)', md: '0 30px 80px rgba(0,0,0,0.25)' },
|
boxShadow: { base: '0 16px 50px rgba(0,0,0,0.2)', md: '0 30px 80px rgba(0,0,0,0.25)' },
|
||||||
borderColor: 'border.emphasized',
|
borderColor: 'border.emphasized',
|
||||||
},
|
},
|
||||||
_before: {
|
})}
|
||||||
content: '""',
|
>
|
||||||
|
{/* Top gradient bar (replaces _before pseudo-element for dynamic gradient support) */}
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
height: { base: '4px', md: '6px' },
|
height: { base: '4px', md: '6px' },
|
||||||
background: theme.gradient,
|
})}
|
||||||
},
|
style={{ background: theme.gradient }}
|
||||||
})}
|
/>
|
||||||
>
|
|
||||||
{/* Icon */}
|
{/* Icon */}
|
||||||
<div
|
<div
|
||||||
className={css({
|
className={css({
|
||||||
|
|
@ -95,10 +98,12 @@ function CreatorCard({
|
||||||
width: { base: '56px', sm: '64px', md: '80px' },
|
width: { base: '56px', sm: '64px', md: '80px' },
|
||||||
height: { base: '56px', sm: '64px', md: '80px' },
|
height: { base: '56px', sm: '64px', md: '80px' },
|
||||||
borderRadius: { base: 'xl', md: '2xl' },
|
borderRadius: { base: 'xl', md: '2xl' },
|
||||||
background: theme.gradient,
|
|
||||||
boxShadow: `0 8px 24px ${theme.shadowColor}`,
|
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
})}
|
})}
|
||||||
|
style={{
|
||||||
|
background: theme.gradient,
|
||||||
|
boxShadow: `0 8px 24px ${theme.shadowColor}`,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{emoji}
|
{emoji}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -182,13 +187,15 @@ function CreatorCard({
|
||||||
px: { base: 4, md: 6 },
|
px: { base: 4, md: 6 },
|
||||||
py: { base: 2, md: 3 },
|
py: { base: 2, md: 3 },
|
||||||
borderRadius: 'xl',
|
borderRadius: 'xl',
|
||||||
background: theme.gradient,
|
|
||||||
color: 'white',
|
color: 'white',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
fontSize: { base: 'sm', md: 'md' },
|
fontSize: { base: 'sm', md: 'md' },
|
||||||
boxShadow: `0 4px 15px ${theme.shadowColor}`,
|
|
||||||
transition: 'all 0.3s',
|
transition: 'all 0.3s',
|
||||||
})}
|
})}
|
||||||
|
style={{
|
||||||
|
background: theme.gradient,
|
||||||
|
boxShadow: `0 4px 15px ${theme.shadowColor}`,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span>{buttonText}</span>
|
<span>{buttonText}</span>
|
||||||
<span className={css({ fontSize: { base: 'md', md: 'lg' } })}>→</span>
|
<span className={css({ fontSize: { base: 'md', md: 'lg' } })}>→</span>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue