diff --git a/src/app/[name]/about/AboutPage.tsx b/src/app/[name]/about/AboutPage.tsx index 107c03c..72867a1 100644 --- a/src/app/[name]/about/AboutPage.tsx +++ b/src/app/[name]/about/AboutPage.tsx @@ -196,9 +196,7 @@ function AboutPage({ data }: Readonly<{ data: AboutDataModel; }>) { return (
- + }> diff --git a/src/app/[name]/orders/page.tsx b/src/app/[name]/orders/page.tsx index 88ecae4..aa42f6b 100644 --- a/src/app/[name]/orders/page.tsx +++ b/src/app/[name]/orders/page.tsx @@ -157,9 +157,7 @@ function OrdersIndex() { return (
- + {firstTab()}} title={categories[0].title} imageSrc={categories[0].image}> diff --git a/src/components/tab/TabContainer.tsx b/src/components/tab/TabContainer.tsx index b97dd7a..395f5e0 100644 --- a/src/components/tab/TabContainer.tsx +++ b/src/components/tab/TabContainer.tsx @@ -10,9 +10,38 @@ import Image from 'next/image'; type Props = { itemRenderer?: (child: ReactNode, index: number) => ReactElement; children: ReactNode; -} & React.OlHTMLAttributes; + className?: TabContainerClassName; +} & Omit, 'className'>; -function TabContainer({ itemRenderer, children, ...restProps }: Props) { +export type TabContainerClassName = { + wrapper?: string; + scrollView?: string; + header?: string; + headerDeactive?: string; + headerActive?: string; + icon?: string; + iconDeactive?: string; + iconActive?: string; + title?: string; + titleDeactive?: string; + titleActive?: string +} + +export const TabContainerClassNames: TabContainerClassName = { + wrapper: 'h-full', + scrollView: 'h-[72px] !pt-3 !pb-2 w-full overflow-y-hidden bg-[#FFFFFF70] justify-center border border-2 border-solid border-white rounded-[32px] inline-flex items-center gap-10', + header: '', + headerDeactive: '', + headerActive: '', + icon: 'text-xs transition-all duration-150', + iconDeactive: 'stroke-disabled-text', + iconActive: 'stroke-black', + title: 'text-xs transition-all duration-150', + titleDeactive: 'text-disabled-text', + titleActive: 'text-black' +} + +function TabContainer({ className = TabContainerClassNames, itemRenderer, children, ...restProps }: Props) { const [selectedTab, setSelectedTab] = useState(0); @@ -26,18 +55,9 @@ function TabContainer({ itemRenderer, children, ...restProps }: Props) { ); return ( -
+
{items.map((item, index) => { @@ -45,7 +65,10 @@ function TabContainer({ itemRenderer, children, ...restProps }: Props) { return ( updateTab(index)} > {imageSrc && @@ -59,18 +82,18 @@ function TabContainer({ itemRenderer, children, ...restProps }: Props) { } {icon && {icon} } - {title} - + ) })}