♻️(frontend) refactor pulse_mic into pulse_background

Make the keyframe more generic with an explicit naming.
This commit is contained in:
lebaudantoine
2024-12-04 18:13:54 +01:00
committed by aleb_the_flash
parent c270299179
commit 1e0e495cd8
2 changed files with 10 additions and 7 deletions

View File

@@ -116,10 +116,10 @@ const config: Config = {
'80%': { transform: 'rotate(20deg)' },
'100%': { transform: 'rotate(0)' },
},
pulse_mic: {
'0%': { color: 'primary', opacity: '1' },
'50%': { color: 'primary', opacity: '0.8' },
'100%': { color: 'primary', opacity: '1' },
pulse_background: {
'0%': { opacity: '1' },
'50%': { opacity: '0.65' },
'100%': { opacity: '1' },
},
},
tokens: defineTokens({

View File

@@ -84,9 +84,12 @@ const MicIndicator = ({ participant }: MicIndicatorProps) => {
<RiMicOffFill color={'gray'} />
) : (
<RiMicFill
style={{
animation: isSpeaking ? 'pulse_mic 800ms infinite' : undefined,
}}
className={css({
color: isSpeaking ? 'primaryDark.300' : 'primaryDark.50',
animation: isSpeaking
? 'pulse_background 800ms infinite'
: undefined,
})}
/>
)}
</Button>