mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 09:17:00 +00:00
updated small calendar item
This commit is contained in:
@@ -3,20 +3,20 @@ import { VariantProps, cva } from "class-variance-authority";
|
||||
import React from "react";
|
||||
|
||||
const CalenderItemVariants = cva(
|
||||
"rounded-sm cursor-pointer bg-opacity-30 hover:bg-opacity-70",
|
||||
"rounded-sm cursor-pointer bg-opacity-15 hover:bg-opacity-70",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-neutral-700",
|
||||
conference: "bg-yellow-300 border-yellow-300 ",
|
||||
dividend: "bg-blue-500 border-blue-500",
|
||||
earnings: "bg-green-500 border-green-500",
|
||||
event: "bg-violet-500 border-violet-500",
|
||||
split: "bg-pink-500 border-pink-500",
|
||||
conference: "bg-yellow-300 text-yellow-300",
|
||||
dividend: "bg-blue-500 text-blue-500",
|
||||
earnings: "bg-green-500 text-green-500",
|
||||
event: "bg-violet-500 text-violet-500",
|
||||
split: "bg-pink-500 text-pink-500",
|
||||
},
|
||||
size: {
|
||||
sm: "whitespace-nowrap",
|
||||
lg: "rounded-lg min-h-16",
|
||||
lg: "min-h-16",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
@@ -44,14 +44,22 @@ const CalendarItem = ({
|
||||
<div
|
||||
className={cn(
|
||||
size == "sm" ? "text-xs h-6" : "",
|
||||
"flex justify-between p-1 font-semibold"
|
||||
"flex justify-between p-1 font-bold"
|
||||
)}
|
||||
>
|
||||
<div className="flex gap-1">
|
||||
<div className="w-1 bg-violet-500 rounded-full" />
|
||||
<div
|
||||
className={cn(
|
||||
CalenderItemVariants({ variant }),
|
||||
variant == "default" && "hidden",
|
||||
"w-1 rounded-full bg-opacity-100"
|
||||
)}
|
||||
/>
|
||||
<div className="flex gap-1 justify-between px-1 w-full">
|
||||
<p>{title}</p>
|
||||
<p className={cn(size == "sm" ? "hidden xl:block" : "", "")}>
|
||||
{time}
|
||||
</p>
|
||||
</div>
|
||||
<p className={cn(size == "sm" ? "hidden xl:block" : "", "")}>{time}</p>
|
||||
</div>
|
||||
{description && <p className="p-1 font-light">{description}</p>}
|
||||
</div>
|
||||
|
||||
@@ -146,6 +146,7 @@ const MonthCalendar = () => {
|
||||
title={`+ ${item.events.length - 3} more`}
|
||||
key="end"
|
||||
size="sm"
|
||||
variant="default"
|
||||
/>,
|
||||
]}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user