Skip to content

Commit

Permalink
use motion library and add list types
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-code committed Nov 27, 2023
1 parent aa38069 commit b35394b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions client/src/components/entities/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Funnel, FunnelFill } from "react-bootstrap-icons";
import { Link } from "react-router-dom";
import { Button, UncontrolledTooltip } from "reactstrap";
import { m } from "framer-motion";
import { motion } from "framer-motion";
import SimpleSessionButton from "../../features/session/components/SimpleSessionButton";
import { stylesByItemType } from "../../utils/helpers/HelperFunctions";
import { EntityType } from "./Entities";
Expand All @@ -48,7 +48,7 @@ function EntityButton({
switch (type) {
case "project":
return animated ? (
<m.div
<motion.div
className="card-button"
whileInView={{
scale: [0.9, 1, 0.9, 1, 0.9, 1],
Expand All @@ -57,7 +57,7 @@ function EntityButton({
viewport={{ once: false }}
>
<SimpleSessionButton fullPath={slug} fromLanding={fromLanding} />
</m.div>
</motion.div>
) : (
<div className="card-button">
<SimpleSessionButton fullPath={slug} />
Expand Down
7 changes: 6 additions & 1 deletion client/src/components/list/ListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ function ListCard({
</div>
)}
</Link>
<EntityButton type={itemType} slug={path ?? ""} animated={animated} fromLanding={fromLanding} />
<EntityButton
type={itemType}
slug={path ?? ""}
animated={animated}
fromLanding={fromLanding}
/>
<Link
className={cx("card-body", "d-block", "text-decoration-none")}
to={url}
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/list/list.types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export interface ListElementProps {
type?: ListDisplayType;
url: string;
visibility: Visibilities;
animated?: boolean;
fromLanding?: boolean;
}

export interface VisibilityIconProps {
Expand Down

0 comments on commit b35394b

Please sign in to comment.