formatting
This commit is contained in:
parent
0471443716
commit
4b28a69856
13 changed files with 2438 additions and 1874 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import { ActionIcon } from '@mantine/core';
|
||||
import { ActionIcon } from "@mantine/core";
|
||||
|
||||
export const ThemeActionIcon = ActionIcon.extend({
|
||||
defaultProps: {
|
||||
variant: 'subtle',
|
||||
radius: 'md',
|
||||
variant: "subtle",
|
||||
radius: "md",
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Alert } from '@mantine/core';
|
||||
import { Alert } from "@mantine/core";
|
||||
|
||||
export const ThemeAlert = Alert.extend({
|
||||
defaultProps: {
|
||||
radius: 'md',
|
||||
radius: "md",
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { AppShell } from '@mantine/core';
|
||||
import { AppShell } from "@mantine/core";
|
||||
|
||||
export const ThemeAppShell = AppShell.extend({
|
||||
defaultProps: {
|
||||
padding: 'md',
|
||||
padding: "md",
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { Badge } from '@mantine/core';
|
||||
import { Badge } from "@mantine/core";
|
||||
|
||||
export const ThemeBadge = Badge.extend({
|
||||
defaultProps: {
|
||||
size: 'sm',
|
||||
radius: 'sm',
|
||||
size: "sm",
|
||||
radius: "sm",
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Button } from '@mantine/core';
|
||||
import { Button } from "@mantine/core";
|
||||
|
||||
export const ThemeButton = Button.extend({
|
||||
defaultProps: {
|
||||
radius: 'md',
|
||||
radius: "md",
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Card } from '@mantine/core';
|
||||
import { Card } from "@mantine/core";
|
||||
|
||||
export const ThemeCard = Card.extend({
|
||||
defaultProps: {
|
||||
padding: 'lg',
|
||||
radius: 'md',
|
||||
padding: "lg",
|
||||
radius: "md",
|
||||
withBorder: true,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Code } from '@mantine/core';
|
||||
import { Code } from "@mantine/core";
|
||||
|
||||
export const ThemeCode = Code.extend({
|
||||
styles: () => ({
|
||||
root: {
|
||||
backgroundColor: 'var(--inspector-surface-code)',
|
||||
backgroundColor: "var(--inspector-surface-code)",
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { Paper } from '@mantine/core';
|
||||
import { Paper } from "@mantine/core";
|
||||
|
||||
export const ThemePaper = Paper.extend({
|
||||
classNames: (_theme, props) => {
|
||||
if (props.variant === 'code') return { root: 'paper-code' };
|
||||
if (props.variant === "code") return { root: "paper-code" };
|
||||
return {};
|
||||
},
|
||||
styles: (_theme, props) => {
|
||||
if (props.variant === 'code') {
|
||||
if (props.variant === "code") {
|
||||
return {
|
||||
root: {
|
||||
padding: 'var(--mantine-spacing-md)',
|
||||
backgroundColor: 'var(--inspector-surface-code)',
|
||||
fontFamily: 'var(--mantine-font-family-monospace)',
|
||||
fontSize: 'var(--mantine-font-size-sm)',
|
||||
overflow: 'auto',
|
||||
padding: "var(--mantine-spacing-md)",
|
||||
backgroundColor: "var(--inspector-surface-code)",
|
||||
fontFamily: "var(--mantine-font-family-monospace)",
|
||||
fontSize: "var(--mantine-font-size-sm)",
|
||||
overflow: "auto",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Select } from '@mantine/core';
|
||||
import { Select } from "@mantine/core";
|
||||
|
||||
export const ThemeSelect = Select.extend({
|
||||
defaultProps: {
|
||||
radius: 'md',
|
||||
radius: "md",
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Switch } from '@mantine/core';
|
||||
import { Switch } from "@mantine/core";
|
||||
|
||||
export const ThemeSwitch = Switch.extend({
|
||||
defaultProps: {
|
||||
radius: 'xl',
|
||||
radius: "xl",
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { TextInput } from '@mantine/core';
|
||||
import { TextInput } from "@mantine/core";
|
||||
|
||||
export const ThemeTextInput = TextInput.extend({
|
||||
defaultProps: {
|
||||
radius: 'md',
|
||||
radius: "md",
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
export { ThemeActionIcon } from './ActionIcon';
|
||||
export { ThemeAlert } from './Alert';
|
||||
export { ThemeAppShell } from './AppShell';
|
||||
export { ThemeBadge } from './Badge';
|
||||
export { ThemeButton } from './Button';
|
||||
export { ThemeCard } from './Card';
|
||||
export { ThemeCode } from './Code';
|
||||
export { ThemePaper } from './Paper';
|
||||
export { ThemeSelect } from './Select';
|
||||
export { ThemeSwitch } from './Switch';
|
||||
export { ThemeTextInput } from './TextInput';
|
||||
export { ThemeActionIcon } from "./ActionIcon";
|
||||
export { ThemeAlert } from "./Alert";
|
||||
export { ThemeAppShell } from "./AppShell";
|
||||
export { ThemeBadge } from "./Badge";
|
||||
export { ThemeButton } from "./Button";
|
||||
export { ThemeCard } from "./Card";
|
||||
export { ThemeCode } from "./Code";
|
||||
export { ThemePaper } from "./Paper";
|
||||
export { ThemeSelect } from "./Select";
|
||||
export { ThemeSwitch } from "./Switch";
|
||||
export { ThemeTextInput } from "./TextInput";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createTheme } from '@mantine/core';
|
||||
import { createTheme } from "@mantine/core";
|
||||
import {
|
||||
ThemeActionIcon,
|
||||
ThemeAlert,
|
||||
|
|
@ -11,17 +11,17 @@ import {
|
|||
ThemeSelect,
|
||||
ThemeSwitch,
|
||||
ThemeTextInput,
|
||||
} from './index';
|
||||
} from "./index";
|
||||
|
||||
export const theme = createTheme({
|
||||
/* ── Color ──────────────────────────────────────────────── */
|
||||
primaryColor: 'dark',
|
||||
primaryColor: "dark",
|
||||
primaryShade: { light: 7, dark: 4 },
|
||||
autoContrast: true,
|
||||
|
||||
/* ── Shape ──────────────────────────────────────────────── */
|
||||
defaultRadius: 'md',
|
||||
cursorType: 'pointer',
|
||||
defaultRadius: "md",
|
||||
cursorType: "pointer",
|
||||
|
||||
/* ── Typography ─────────────────────────────────────────── */
|
||||
fontFamily:
|
||||
|
|
@ -29,7 +29,7 @@ export const theme = createTheme({
|
|||
fontFamilyMonospace:
|
||||
'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',
|
||||
headings: {
|
||||
fontWeight: '600',
|
||||
fontWeight: "600",
|
||||
},
|
||||
|
||||
/* ── Component overrides ────────────────────────────────── */
|
||||
|
|
|
|||
Loading…
Reference in a new issue