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";
|
import React from "react";
|
||||||
|
|
||||||
const CalenderItemVariants = cva(
|
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: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default: "bg-neutral-700",
|
default: "bg-neutral-700",
|
||||||
conference: "bg-yellow-300 border-yellow-300 ",
|
conference: "bg-yellow-300 text-yellow-300",
|
||||||
dividend: "bg-blue-500 border-blue-500",
|
dividend: "bg-blue-500 text-blue-500",
|
||||||
earnings: "bg-green-500 border-green-500",
|
earnings: "bg-green-500 text-green-500",
|
||||||
event: "bg-violet-500 border-violet-500",
|
event: "bg-violet-500 text-violet-500",
|
||||||
split: "bg-pink-500 border-pink-500",
|
split: "bg-pink-500 text-pink-500",
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
sm: "whitespace-nowrap",
|
sm: "whitespace-nowrap",
|
||||||
lg: "rounded-lg min-h-16",
|
lg: "min-h-16",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
@@ -44,14 +44,22 @@ const CalendarItem = ({
|
|||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
size == "sm" ? "text-xs h-6" : "",
|
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
|
||||||
<div className="w-1 bg-violet-500 rounded-full" />
|
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>{title}</p>
|
||||||
|
<p className={cn(size == "sm" ? "hidden xl:block" : "", "")}>
|
||||||
|
{time}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p className={cn(size == "sm" ? "hidden xl:block" : "", "")}>{time}</p>
|
|
||||||
</div>
|
</div>
|
||||||
{description && <p className="p-1 font-light">{description}</p>}
|
{description && <p className="p-1 font-light">{description}</p>}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ const MonthCalendar = () => {
|
|||||||
title={`+ ${item.events.length - 3} more`}
|
title={`+ ${item.events.length - 3} more`}
|
||||||
key="end"
|
key="end"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
variant="default"
|
||||||
/>,
|
/>,
|
||||||
]}
|
]}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user