Skip to content

chore: Implement UI/UX enhancements for Accordion Component #25

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
14 changes: 7 additions & 7 deletions src/Components/Accordion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ const Accordion: FC<IAccordionProps> = ({
<IconDrag className='yl-w-6 yl-opacity-50 yl-mr-1' />
</div>
)}
<div className='yl-flex yl-flex-col yl-gap-1 yl-overflow-hidden yl-text-ellipsis yl-whitespace-nowrap yl-text-base'>
<div className='yl-flex yl-flex-col yl-gap-1 yl-overflow-hidden yl-text-ellipsis yl-whitespace-nowrap yl-text-base yl-w-[90%]'>
{section.title}
{section.description && (
<Paragraph className='yl-text-xs yl-text-primary-text-color/70 yl-truncate'>
{section.description}
</Paragraph>
)}
{expanded.includes(section.id) ? (
<IconExpandLess
onClick={e => {
Expand All @@ -164,12 +170,6 @@ const Accordion: FC<IAccordionProps> = ({
className='yl-absolute yl-right-2 yl-w-6 yl-cursor-pointer yl-fill-primary hover:yl-fill-primary'
/>
)}
{section.title}
{section.description && (
<Paragraph className='yl-text-xs yl-text-primary-text-color/70'>
{section.description}
</Paragraph>
)}
</div>
</h3>

Expand Down