Skip to content

Commit

Permalink
feat : 깜박이는 로딩 효과 적용 범위를 text이외로 넓힘
Browse files Browse the repository at this point in the history
- 컴포넌트명 변경 : TextBlinkLoader -> BlinkLoader
- common 하위에 loading 폴더 생성 및 컴포넌트 폴더 위치 이동
  • Loading branch information
BadaHertz52 committed Jan 22, 2025
1 parent 43a664d commit f98633d
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 29 deletions.
7 changes: 0 additions & 7 deletions frontend/src/components/common/TextBlinkLoader/index.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions frontend/src/components/common/TextBlinkLoader/style.ts

This file was deleted.

1 change: 0 additions & 1 deletion frontend/src/components/common/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ export { default as ReviewEmptySection } from './ReviewEmptySection';
export * from './modals';
export { default as CopyTextButton } from './CopyTextButton';
export { default as ReviewCard } from './ReviewCard';
export { default as TextBlinkLoader } from './TextBlinkLoader';
1 change: 1 addition & 0 deletions frontend/src/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export * from './highlight/components';
export * from './login';
export * from './reviewURL';
export * from './skeleton';
export * from './loading';
11 changes: 11 additions & 0 deletions frontend/src/components/loading/BlinkLoader/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

import { EssentialPropsWithChildren } from '@/types';

import * as S from './style';

const BlinkLoader = ({ children }: EssentialPropsWithChildren) => {
return <S.Loader>{children}</S.Loader>;
};

export default BlinkLoader;
11 changes: 11 additions & 0 deletions frontend/src/components/loading/BlinkLoader/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import styled from '@emotion/styled';

export const Loader = styled.div`
animation: l1 1s linear infinite alternate;
@keyframes l1 {
to {
opacity: 0;
}
}
`;
1 change: 1 addition & 0 deletions frontend/src/components/loading/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as BlinkLoader } from './BlinkLoader';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DataForReviewRequestCode } from '@/apis/group';
import { Button, TextBlinkLoader } from '@/components';
import { Button, BlinkLoader } from '@/components';
import { HOM_EVENT_NAME } from '@/constants';
import { debounce, trackEventInAmplitude } from '@/utils';

Expand Down Expand Up @@ -42,7 +42,7 @@ const URLGeneratorButton = ({
onClick={handleURLCreationButtonClick}
disabled={!isFormValid && !mutation.isPending}
>
{mutation.isPending ? <TextBlinkLoader $content="리뷰 링크 생성 중..." /> : <p>리뷰 링크 생성하기</p>}
{mutation.isPending ? <BlinkLoader>리뷰 링크 생성 중...</BlinkLoader> : '리뷰 링크 생성하기'}
</Button>
);
};
Expand Down

0 comments on commit f98633d

Please sign in to comment.