diff --git a/src/components/timeline/TimelineCard.tsx b/src/components/timeline/TimelineCard.tsx index b3c755f..0ee5daf 100644 --- a/src/components/timeline/TimelineCard.tsx +++ b/src/components/timeline/TimelineCard.tsx @@ -1,5 +1,6 @@ import react, {Children, ReactNode} from 'react' import TimelineCardSummary from './TimelineCardSummary' +import { FaCaretDown } from 'react-icons/fa' type TimelineCardProps = { children: react.ReactElement>[] @@ -17,7 +18,10 @@ function TimelineCard({ children } : TimelineCardProps) { }); return (
- {titles} + + {titles} + +
{childrens}
) diff --git a/src/components/timeline/TimelineElement.scss b/src/components/timeline/TimelineElement.scss index cb10bf3..6484df0 100644 --- a/src/components/timeline/TimelineElement.scss +++ b/src/components/timeline/TimelineElement.scss @@ -36,7 +36,7 @@ } & > summary { - @apply block select-none cursor-pointer outline-none p-5 font-semibold; + @apply relative block select-none cursor-pointer outline-none p-5 pr-10 font-semibold; // BEGIN TRANSITION @apply mb-0; @@ -46,11 +46,24 @@ &:hover { @apply bg-primary/20 dark:bg-dark_primary/20; } + + i { + @apply absolute right-5 h-full top-0 flex items-center; + + & > svg { + @apply scale-125; + transition: transform 300ms ease; + } + } } &[open] { & > summary { @apply mb-5; // TRANSITION + + & > i > svg { + @apply -rotate-180; + } } } }