Skip to content

Commit

Permalink
Fix accordion animation
Browse files Browse the repository at this point in the history
  • Loading branch information
savbmeta committed Jul 26, 2024
1 parent f957e47 commit 5b09595
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Accordion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const itemButtonclass = [

export const AccordionItem = ({ children, title, id, onSelect, isSelected }) => {
const contentClasses = [
isSelected ? '' : 'max-h-0',
isSelected ? 'max-h-inf' : 'max-h-0',
'overflow-hidden',
'transition-all',
'ease-in-out',
'duration-500'
'duration-500',
]

const iconClasses = [
Expand Down
4 changes: 4 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

.max-h-inf {
max-height: 10000px;
}

0 comments on commit 5b09595

Please sign in to comment.