From f91e7b8173a4beeddd49cad5e728b8035811b4c1 Mon Sep 17 00:00:00 2001 From: ChanLee_KR Date: Sat, 20 Jul 2024 22:56:06 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=95=84=ED=84=B0=20UI=20=EA=B8=B0?= =?UTF-8?q?=EB=B3=B8=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=20(#ATR-571)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../filter-article/ui/FilterButton.tsx | 30 +++++++++++++++++++ .../filter-article/ui/FilterDropdownBtn.tsx | 14 +++------ .../filter-article/ui/HideReadToggleBtn.tsx | 14 ++++----- .../features/filter-article/ui/SearchBar.tsx | 10 ++----- 4 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 apps/service/src/features/filter-article/ui/FilterButton.tsx diff --git a/apps/service/src/features/filter-article/ui/FilterButton.tsx b/apps/service/src/features/filter-article/ui/FilterButton.tsx new file mode 100644 index 00000000..b43ddd75 --- /dev/null +++ b/apps/service/src/features/filter-article/ui/FilterButton.tsx @@ -0,0 +1,30 @@ +'use client' + +import React, { + DetailedHTMLProps, + InputHTMLAttributes, + LegacyRef, + forwardRef, +} from 'react' + +const FilterButton = forwardRef< + HTMLInputElement, + DetailedHTMLProps< + InputHTMLAttributes, + HTMLButtonElement + > & { active?: boolean } +>(({ type, className, active: isActive = false, ...props }, ref) => ( + + 카테고리 diff --git a/apps/service/src/features/filter-article/ui/HideReadToggleBtn.tsx b/apps/service/src/features/filter-article/ui/HideReadToggleBtn.tsx index 4362c2c6..44bacd4e 100644 --- a/apps/service/src/features/filter-article/ui/HideReadToggleBtn.tsx +++ b/apps/service/src/features/filter-article/ui/HideReadToggleBtn.tsx @@ -1,7 +1,7 @@ 'use client' -import { Button } from '@attraction/design-system/dist' import { CheckOutline } from '@attraction/icons' +import FilterButton from './FilterButton' interface HideReadToggleBtnProps { isRead: boolean @@ -13,18 +13,14 @@ export default function HideReadToggleBtn({ toggleHideFn, }: HideReadToggleBtnProps) { return ( - + ) } diff --git a/apps/service/src/features/filter-article/ui/SearchBar.tsx b/apps/service/src/features/filter-article/ui/SearchBar.tsx index 647d052d..6e23a6de 100644 --- a/apps/service/src/features/filter-article/ui/SearchBar.tsx +++ b/apps/service/src/features/filter-article/ui/SearchBar.tsx @@ -1,9 +1,7 @@ 'use client' import { useEffect, useState } from 'react' -import { Input } from '@attraction/design-system/dist' import { BackspaceOutline, MagnifyingGlassOutline } from '@attraction/icons' - import { useDebounce } from '@/shared/lib' interface SearchBarProps { @@ -17,11 +15,9 @@ export default function SearchBar({ setValue }: SearchBarProps) { useEffect(() => setValue(debouncedValue), [debouncedValue, setValue]) return ( -
- - - - + +