feat: styles for deal drawer
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
.container {
|
||||
cursor: pointer;
|
||||
min-height: calc(var(--mantine-spacing-md) + var(--mantine-spacing-lg));
|
||||
min-width: calc(var(--mantine-spacing-md) + var(--mantine-spacing-lg));
|
||||
}
|
||||
34
src/components/ui/ActionIconWithTip/ActionIconWithTip.tsx
Normal file
34
src/components/ui/ActionIconWithTip/ActionIconWithTip.tsx
Normal file
@ -0,0 +1,34 @@
|
||||
import { FC, PropsWithChildren } from "react";
|
||||
import {
|
||||
ActionIcon,
|
||||
ActionIconProps,
|
||||
PolymorphicComponentProps,
|
||||
Tooltip,
|
||||
} from "@mantine/core";
|
||||
import style from "./ActionIconWithTip.module.css";
|
||||
|
||||
type Props = PolymorphicComponentProps<"button", ActionIconProps> & {
|
||||
tipLabel?: string;
|
||||
};
|
||||
|
||||
const ActionIconWithTip: FC<PropsWithChildren<Props>> = ({
|
||||
children,
|
||||
tipLabel,
|
||||
...props
|
||||
}) => (
|
||||
<Tooltip
|
||||
label={tipLabel}
|
||||
hidden={!tipLabel}
|
||||
h={"max-content"}
|
||||
w={"max-content"}>
|
||||
<ActionIcon
|
||||
variant={"default"}
|
||||
radius={"lg"}
|
||||
className={style.container}
|
||||
{...props}>
|
||||
{children}
|
||||
</ActionIcon>
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
export default ActionIconWithTip;
|
||||
11
src/components/ui/BaseTable/BaseTable.module.css
Normal file
11
src/components/ui/BaseTable/BaseTable.module.css
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
.table-border {
|
||||
border-width: 1px;
|
||||
border-radius: var(--mantine-radius-lg);
|
||||
@mixin light {
|
||||
border-color: var(--mantine-color-gray-4);
|
||||
}
|
||||
@mixin dark {
|
||||
border-color: var(--mantine-color-dark-4);
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,18 @@
|
||||
import React from "react";
|
||||
import classNames from "classnames";
|
||||
import { DataTable, DataTableProps } from "mantine-datatable";
|
||||
import styles from "./BaseTable.module.css";
|
||||
|
||||
function BaseTable<T>(props: DataTableProps<T>) {
|
||||
return (
|
||||
<DataTable
|
||||
withTableBorder
|
||||
withRowBorders
|
||||
striped={false}
|
||||
verticalAlign={"center"}
|
||||
backgroundColor={"transparent"}
|
||||
className={classNames(
|
||||
props.withTableBorder && styles["table-border"]
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user