mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-14 05:05:09 +03:00
253e866a86
# Description Hope ya'll don't mind, I updated the User Profile's UI to be a bit more readable. Kept the design neutral to not impose styles. I also kept the original toggle buttons for Theme and Language in case we still want to use those in other places in the app, where a select menu isn't necessary. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate): https://github.com/StanGirard/quivr/assets/64866427/d0320852-ece1-4002-a180-0005df132e71 https://github.com/StanGirard/quivr/assets/64866427/be3c67ec-8d42-44f9-8131-35a70aec20ef --------- Co-authored-by: Zineb El Bachiri <100568984+gozineb@users.noreply.github.com> Co-authored-by: Stan Girard <girard.stanislas@gmail.com>
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
/* eslint-disable */
|
|
"use client";
|
|
import { motion } from "framer-motion";
|
|
import { forwardRef, HTMLAttributes, LegacyRef } from "react";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
type CardProps = HTMLAttributes<HTMLDivElement>;
|
|
|
|
const Card = forwardRef(
|
|
({ children, className, ...props }: CardProps, ref): JSX.Element => {
|
|
return (
|
|
<div
|
|
ref={ref as LegacyRef<HTMLDivElement>}
|
|
className={cn(
|
|
"shadow-md dark:shadow-primary/25 hover:shadow-xl transition-shadow rounded-xl overflow-hidden bg-white dark:bg-black border border-black/10 dark:border-white/25",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|
|
);
|
|
|
|
type CardChildProps = HTMLAttributes<HTMLDivElement>;
|
|
|
|
const CardHeader = ({ children, className }: CardChildProps) => {
|
|
return <div className={cn("border-b p-3", className)}>{children}</div>;
|
|
};
|
|
CardHeader.displayName = "CardHeader";
|
|
|
|
const CardBody = ({ children, className }: CardChildProps) => {
|
|
return <div className={cn("p-3", className)}>{children}</div>;
|
|
};
|
|
CardBody.displayName = "CardHeader";
|
|
|
|
const CardFooter = ({ children, className }: CardChildProps) => {
|
|
return <div className={cn("border-t p-3", className)}>{children}</div>;
|
|
};
|
|
CardFooter.displayName = "CardHeader";
|
|
|
|
export { CardBody, CardFooter, CardHeader };
|
|
|
|
export const AnimatedCard = motion(Card);
|
|
AnimatedCard.displayName = "AnimatedCard";
|
|
Card.displayName = "Card";
|
|
export default Card;
|