-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b983ed
commit a7869f5
Showing
6 changed files
with
201 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,73 @@ | ||
import React from 'react' | ||
import ContextHeader from '@/components/layout/contextHeader' | ||
|
||
import { Button } from '@/components/ui/button' | ||
import { ToastAction } from '@/components/ui/toast' | ||
import { useToast } from '@/components/ui/use-toast' | ||
|
||
import { | ||
Card, | ||
Metric, | ||
Text, | ||
Flex, | ||
BadgeDelta, | ||
DeltaType, | ||
Grid | ||
} from '@tremor/react' | ||
const categories: { | ||
title: string | ||
metric: string | ||
metricPrev: string | ||
delta: string | ||
deltaType: DeltaType | ||
}[] = [ | ||
{ | ||
title: 'Sales', | ||
metric: '$ 12,699', | ||
metricPrev: '$ 9,456', | ||
delta: '34.3%', | ||
deltaType: 'moderateIncrease' | ||
}, | ||
{ | ||
title: 'Profit', | ||
metric: '$ 40,598', | ||
metricPrev: '$ 45,564', | ||
delta: '10.9%', | ||
deltaType: 'moderateDecrease' | ||
}, | ||
{ | ||
title: 'Customers', | ||
metric: '1,072', | ||
metricPrev: '856', | ||
delta: '25.3%', | ||
deltaType: 'moderateIncrease' | ||
} | ||
] | ||
export default function Bots(): JSX.Element { | ||
const { toast } = useToast() | ||
return ( | ||
<ContextHeader isBot> | ||
<Button | ||
variant="outline" | ||
onClick={() => { | ||
toast({ | ||
title: 'Scheduled: Catch up ', | ||
description: 'Friday, February 10, 2023 at 5:57 PM', | ||
action: ( | ||
<ToastAction altText="Goto schedule to undo">Undo</ToastAction> | ||
) | ||
}) | ||
}} | ||
> | ||
Add to calendar | ||
</Button> | ||
<Grid numItemsSm={2} numItemsLg={3} className="gap-6"> | ||
{categories.map((item) => ( | ||
<Card key={item.title}> | ||
<Flex alignItems="start"> | ||
<Text>{item.title}</Text> | ||
<BadgeDelta | ||
className=" rounded-tremor-small" | ||
deltaType={item.deltaType} | ||
> | ||
{item.delta} | ||
</BadgeDelta> | ||
</Flex> | ||
<Flex | ||
justifyContent="start" | ||
alignItems="baseline" | ||
className="space-x-3 truncate" | ||
> | ||
<Metric>{item.metric}</Metric> | ||
<Text className="truncate">from {item.metricPrev}</Text> | ||
</Flex> | ||
</Card> | ||
))} | ||
</Grid> | ||
</ContextHeader> | ||
) | ||
} |
Oops, something went wrong.