-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathbuttons.tsx
More file actions
75 lines (72 loc) · 2.87 KB
/
buttons.tsx
File metadata and controls
75 lines (72 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import { EyeIcon, PencilIcon } from "lucide-react";
import { Box, Typography, useTheme } from "@mui/material";
import { createFileRoute } from "@tanstack/react-router";
import { SplitButtonOptions } from "@/components/common/inputs/splitButton";
import { PageWrapper } from "@/components/common/page";
export const Route = createFileRoute("/debug/design/buttons")({
component: RouteComponent,
});
function RouteComponent() {
const theme = useTheme();
return (
<PageWrapper sx={{ gap: "1rem", display: "flex", flexDirection: "column" }}>
<Box>
<Typography
variant="h1"
gutterBottom
sx={{ textAlign: "center", fontSize: "2rem", fontWeight: "bold" }}
>
Buttons
</Typography>
<Typography variant="body1">
This page was used to design and test button styles. It contains
various button styles and their states. It is mainly used for
testing and debugging purposes.
</Typography>
</Box>
<Box>
<Typography
variant="h2"
gutterBottom
sx={{ fontSize: "1.5rem", fontWeight: "bold" }}
>
Button with dropdown menu
</Typography>
<Typography variant="body1">
A multi state button with a dropdown menu. It can be used to select
different actions for the button. Used in inbox.
</Typography>
<Box
sx={{
display: "flex",
justifyContent: "center",
marginTop: "1rem",
}}
>
<SplitButtonOptions
options={[
{
label: "Action 1",
key: "action1",
buttonProps: {
startIcon: <PencilIcon size={theme.iconSize.md} />,
},
},
{
label: "Action 2",
key: "action2",
buttonProps: {
startIcon: <EyeIcon size={theme.iconSize.md} />,
},
},
{ label: "Action 3", key: "action3" },
]}
onClick={(option, evt) => {
alert(`Clicked on ${option.label}`);
}}
/>
</Box>
</Box>
</PageWrapper>
);
}