Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue fixes #119

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 68 additions & 32 deletions apps/web/app/(webapp)/(components)/TransparentPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,45 +29,81 @@ const TransparentPanel = ({
}
};

let userInterface = (data: any) => {
return(
<div
key={data?.id}
className='whitespace-nowrap cursor-pointer relative w-fit flex flex-col py-[9px]'
onClick={() => handleClick(data?.value)}
>
<div className={`${currentValue == data?.value ? 'text-o-blue font-[500]' : 'text-o-text-medium3'}
capitalize text-f14 hover:text-o-blue`}
>
{data?.label}
</div>
// let userInterface = (data: any) => {
// return(
// <div
// key={data?.id}
// className='whitespace-nowrap cursor-pointer relative w-fit flex flex-col py-[9px]'
// onClick={() => handleClick(data?.value)}
// >
// <div className={`${currentValue == data?.value ? 'text-o-blue font-[500]' : 'text-o-text-medium3'}
// capitalize text-f14 hover:text-o-blue`}
// >
// {data?.label}
// </div>

{
currentValue == data?.value &&
<motion.div
className='pane-underline'
layoutId='transparent-pane-underline'
></motion.div>
}
</div>
);
}
// {
// currentValue == data?.value &&
// <motion.div
// className='pane-underline'
// layoutId='transparent-pane-underline'
// ></motion.div>
// }
// </div>
// );
// }

return (
<div className={`overflow-x-auto overflow-y-hidden border-b-[2px] border-[#DCE3EB]
flex items-center gap-[16px] h-[38px] w-full ${containerStyle}`}
>
{
panel?.map((data) => {
if (status) {
return (
data?.type?.includes(status || '') ?
userInterface(data) : null
);
} else {
return userInterface(data);
}
})
panel?.map((data) => (
status ?
(
data?.type?.includes(status || '') ?
<div
key={data?.id}
className='whitespace-nowrap cursor-pointer relative w-fit flex flex-col py-[9px]'
onClick={() => handleClick(data?.value)}
>
<div className={`${currentValue == data?.value ? 'text-o-blue font-[500]' : 'text-o-text-medium3'}
capitalize text-f14 hover:text-o-blue`}
>
{data?.label}
</div>

{
currentValue == data?.value &&
<motion.div
className='pane-underline'
layoutId='transparent-pane-underline'
></motion.div>
}
</div>
: null
) : (
<div
key={data?.id}
className='whitespace-nowrap cursor-pointer relative w-fit flex flex-col py-[9px]'
onClick={() => handleClick(data?.value)}
>
<div className={`${currentValue == data?.value ? 'text-o-blue font-[500]' : 'text-o-text-medium3'}
capitalize text-f14 hover:text-o-blue`}
>
{data?.label}
</div>

{
currentValue == data?.value &&
<motion.div
className='pane-underline'
layoutId='transparent-pane-underline'
></motion.div>
}
</div>
)
))
}
</div>
)
Expand Down