From 41cb391fcd6555799c58d933e4e8c33c73b7b346 Mon Sep 17 00:00:00 2001 From: Lex Lim Date: Mon, 17 Oct 2022 17:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=81=A2=E5=A4=8D=E5=8E=9F?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E8=BF=9B=E5=BA=A6=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/components/conversation.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/styles/components/conversation.ts b/src/styles/components/conversation.ts index be121d0..55192a5 100644 --- a/src/styles/components/conversation.ts +++ b/src/styles/components/conversation.ts @@ -58,17 +58,17 @@ export const LoadingBar = styled.div<{ visible: boolean; progress: number }>` height: 1px; position: absolute; top: 0; - width: ${(props) => (props.progress === 0 ? 100 : props.progress)}%; - background-image: ${(props) => (props.progress === 0 ? `linear-gradient( + width: 100%; + background-image: linear-gradient( 90deg, ${(props) => props.theme.colors.textHeadings} 0%, ${(props) => props.theme.colors.bg2} 40%, ${(props) => props.theme.colors.bg3} 60%, ${(props) => props.theme.colors.textHeadings} 100% - );` : props.theme.colors.textHeadings)} + ); background-size: 200%; background-repeat: repeat-x; - animation: ${(props) => (props.progress === 0 ? `${Gradient} 2s linear infinite` : 'none')}; + animation: ${Gradient} 2s linear infinite; opacity: ${(props) => (props.visible ? '1' : '0')}; transition: opacity 0.2s ease-in-out; }