Added button styles to theme
This commit is contained in:
1 parent
7c247c0367
commit
313a3af67c
5 files changed
+49
-26
No files matched your search
@@ -73,17 +73,6 @@ const Button = ({
|
|||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
disableRipple
|
disableRipple
|
||||||
sx={{
|
sx={{
|
||||||
lineHeight: 1.5,
|
|
||||||
fontWeight: 400,
|
|
||||||
boxShadow: "none",
|
|
||||||
textTransform: "none",
|
|
||||||
borderRadius: "4px",
|
|
||||||
"&:focus": {
|
|
||||||
outline: "none",
|
|
||||||
},
|
|
||||||
"&:hover": {
|
|
||||||
boxShadow: "none",
|
|
||||||
},
|
|
||||||
...sx,
|
...sx,
|
||||||
}}
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ aside.collapsed .MuiAvatar-root + .MuiBox-root + .MuiIconButton-root {
|
|||||||
}
|
}
|
||||||
|
|
||||||
aside .MuiListSubheader-root {
|
aside .MuiListSubheader-root {
|
||||||
transition: all 200ms ease;
|
transition: padding 200ms ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fadeIn {
|
@keyframes fadeIn {
|
||||||
|
|||||||
@@ -3,10 +3,9 @@ import { useEffect } from "react";
|
|||||||
import { useSelector, useDispatch } from "react-redux";
|
import { useSelector, useDispatch } from "react-redux";
|
||||||
import { getUptimeMonitorsByTeamId } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
import { getUptimeMonitorsByTeamId } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import Button from "../../../Components/Button";
|
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import BasicTable from "../../../Components/BasicTable";
|
import BasicTable from "../../../Components/BasicTable";
|
||||||
import { Box, Stack, Typography } from "@mui/material";
|
import { Box, Button, Stack, Typography } from "@mui/material";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import SkeletonLayout from "./skeleton";
|
import SkeletonLayout from "./skeleton";
|
||||||
import Fallback from "./fallback";
|
import Fallback from "./fallback";
|
||||||
@@ -77,13 +76,15 @@ const Monitors = ({ isAdmin }) => {
|
|||||||
<Greeting type="uptime" />
|
<Greeting type="uptime" />
|
||||||
{monitorState.monitors?.length !== 0 && (
|
{monitorState.monitors?.length !== 0 && (
|
||||||
<Button
|
<Button
|
||||||
level="primary"
|
variant="contained"
|
||||||
label="Create monitor"
|
color="common"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate("/monitors/create");
|
navigate("/monitors/create");
|
||||||
}}
|
}}
|
||||||
sx={{ fontWeight: 500 }}
|
sx={{ fontWeight: 500 }}
|
||||||
/>
|
>
|
||||||
|
Create monitor
|
||||||
|
</Button>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const background = {
|
|||||||
accent: "#18181a",
|
accent: "#18181a",
|
||||||
};
|
};
|
||||||
const border = { light: "#27272a", dark: "#2c2c2c" };
|
const border = { light: "#27272a", dark: "#2c2c2c" };
|
||||||
|
const common = { main: "#1570ef", dark: "#0e4ea7", contrastText: "#FFFFFF" };
|
||||||
|
|
||||||
const fontFamilyDefault =
|
const fontFamilyDefault =
|
||||||
'"Inter","system-ui", "Avenir", "Helvetica", "Arial", sans-serif';
|
'"Inter","system-ui", "Avenir", "Helvetica", "Arial", sans-serif';
|
||||||
@@ -24,7 +25,7 @@ const darkTheme = createTheme({
|
|||||||
typography: { fontFamily: fontFamilyDefault, fontSize: 13 },
|
typography: { fontFamily: fontFamilyDefault, fontSize: 13 },
|
||||||
palette: {
|
palette: {
|
||||||
mode: "dark",
|
mode: "dark",
|
||||||
common: { main: "#1570ef" },
|
common: common,
|
||||||
text: text,
|
text: text,
|
||||||
background: background,
|
background: background,
|
||||||
border: border,
|
border: border,
|
||||||
@@ -46,6 +47,7 @@ const darkTheme = createTheme({
|
|||||||
main: "#d32f2f",
|
main: "#d32f2f",
|
||||||
light: "#1e1e1e",
|
light: "#1e1e1e",
|
||||||
bg: "#27272a",
|
bg: "#27272a",
|
||||||
|
dark: "#932020",
|
||||||
border: "#f04438",
|
border: "#f04438",
|
||||||
},
|
},
|
||||||
warning: {
|
warning: {
|
||||||
@@ -77,10 +79,25 @@ const darkTheme = createTheme({
|
|||||||
},
|
},
|
||||||
spacing: 2,
|
spacing: 2,
|
||||||
components: {
|
components: {
|
||||||
MuiButtonBase: {
|
MuiButton: {
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
disableRipple: true,
|
disableRipple: true,
|
||||||
},
|
},
|
||||||
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
variants: [],
|
||||||
|
fontWeight: 400,
|
||||||
|
borderRadius: 4,
|
||||||
|
boxShadow: "none",
|
||||||
|
textTransform: "none",
|
||||||
|
"&:focus": {
|
||||||
|
outline: "none",
|
||||||
|
},
|
||||||
|
"&:hover": {
|
||||||
|
boxShadow: "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
MuiIconButton: {
|
MuiIconButton: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ const background = {
|
|||||||
accent: "#f9fafb",
|
accent: "#f9fafb",
|
||||||
};
|
};
|
||||||
const border = { light: "#eaecf0", dark: "#d0d5dd" };
|
const border = { light: "#eaecf0", dark: "#d0d5dd" };
|
||||||
|
const common = { main: "#1570ef", dark: "#0e4ea7", contrastText: "#FFFFFF" };
|
||||||
|
|
||||||
const fontFamilyDefault =
|
const fontFamilyDefault =
|
||||||
'"Inter","system-ui", "Avenir", "Helvetica", "Arial", sans-serif';
|
'"Inter","system-ui", "Avenir", "Helvetica", "Arial", sans-serif';
|
||||||
@@ -22,16 +23,16 @@ const shadow =
|
|||||||
const lightTheme = createTheme({
|
const lightTheme = createTheme({
|
||||||
typography: { fontFamily: fontFamilyDefault, fontSize: 13 },
|
typography: { fontFamily: fontFamilyDefault, fontSize: 13 },
|
||||||
palette: {
|
palette: {
|
||||||
common: { main: "#1570ef" },
|
common: common,
|
||||||
text: text,
|
text: text,
|
||||||
background: background,
|
background: background,
|
||||||
border: border,
|
border: border,
|
||||||
info: {
|
info: {
|
||||||
text: "#475467",
|
text: text.primary,
|
||||||
main: "#475467",
|
main: text.primary,
|
||||||
bg: "#ffffff",
|
bg: background.main,
|
||||||
light: "#ffffff",
|
light: background.main,
|
||||||
border: "#D0D5DD",
|
border: border.dark,
|
||||||
},
|
},
|
||||||
success: {
|
success: {
|
||||||
text: "#079455",
|
text: "#079455",
|
||||||
@@ -75,10 +76,25 @@ const lightTheme = createTheme({
|
|||||||
},
|
},
|
||||||
spacing: 2,
|
spacing: 2,
|
||||||
components: {
|
components: {
|
||||||
MuiButtonBase: {
|
MuiButton: {
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
disableRipple: true,
|
disableRipple: true,
|
||||||
},
|
},
|
||||||
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
variants: [],
|
||||||
|
fontWeight: 400,
|
||||||
|
borderRadius: 4,
|
||||||
|
boxShadow: "none",
|
||||||
|
textTransform: "none",
|
||||||
|
"&:focus": {
|
||||||
|
outline: "none",
|
||||||
|
},
|
||||||
|
"&:hover": {
|
||||||
|
boxShadow: "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
MuiIconButton: {
|
MuiIconButton: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
|
|||||||
Reference in new issue
Block a user