Skip to content

Commit

Permalink
landing
Browse files Browse the repository at this point in the history
  • Loading branch information
eden-lane committed Feb 1, 2024
1 parent 163ce06 commit 4e4b87b
Show file tree
Hide file tree
Showing 57 changed files with 5,404 additions and 58 deletions.
480 changes: 457 additions & 23 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@
"@types/react-dom": "^18.2.7",
"astro": "^3.0.12",
"classnames": "^2.3.2",
"colord": "^2.9.3",
"date-fns": "^2.29.3",
"date-fns-tz": "^2.0.0",
"nanoid": "^5.0.4",
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18.2.0",
"react-use-measure": "^2.1.1"
"react-use-measure": "^2.1.1",
"rrule": "^2.8.1",
"styled-components": "^6.1.1"
}
}
1 change: 1 addition & 0 deletions public/icons/chevron-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/drag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/navigation/calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/navigation/help.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/navigation/notes.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/navigation/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/navigation/stats.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/navigation/tasks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/play.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/triangle-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/components/Accordion/Accordion.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
padding: 0;
}

.icon {
display: inline-flex;
vertical-align: middle;
transition: transform 0.3s ease-in-out;
}

.icon.open {
transform: rotate(180deg);
}

@media screen and (min-width: 769px) {
.demo {
display: none;
Expand Down
22 changes: 16 additions & 6 deletions src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import React, { useRef, type ReactNode, useLayoutEffect, useState } from "react";
import React, {
useRef,
type ReactNode,
useLayoutEffect,
useState,
} from "react";
import { animated, useSpring, useTransition } from "@react-spring/web";
import useMeasure from 'react-use-measure';
import useMeasure from "react-use-measure";
import cn from "classnames";
import styles from "./Accordion.module.css";

Expand All @@ -27,7 +32,14 @@ export const AccordionItem = (props: Props) => {
})}
>
<h3 className={styles.title} onClick={onOpen}>
{title}
<span
className={cn(styles.icon, {
[styles.open]: open,
})}
>
<img src="/icons/triangle-down.svg" width={8} height={8} />
</span>{" "}
<span>{title}</span>
</h3>
<animated.div style={style} className={styles.content}>
<div ref={ref}>{children}</div>
Expand Down Expand Up @@ -59,9 +71,7 @@ export const Accordion = (props: AccordionProps) => {
onOpen={() => onIndexChange(i)}
>
{item.content}
<div className={styles.demo}>
{item.demo}
</div>
<div className={styles.demo}>{item.demo}</div>
</AccordionItem>
))}
</div>
Expand Down
Loading

0 comments on commit 4e4b87b

Please sign in to comment.