diff --git a/examples/index.tsx b/examples/index.tsx
index aaf4208..221aaa1 100644
--- a/examples/index.tsx
+++ b/examples/index.tsx
@@ -309,6 +309,23 @@ const app = (
+
+
+
+ }
+ >
+
+
+
This is a basic card.
diff --git a/src/BaseTooltipTitle.tsx b/src/BaseTooltipTitle.tsx
index c365eef..73e135a 100644
--- a/src/BaseTooltipTitle.tsx
+++ b/src/BaseTooltipTitle.tsx
@@ -6,14 +6,13 @@ import {
ThemeProvider,
StyledEngineProvider,
} from "@mui/material";
-
import makeStyles from "@mui/styles/makeStyles";
-
+import SVG from "react-inlinesvg";
import { theme, darkGrey } from "./theme";
import type { Tooltip } from "./tooltips";
type Props = {
- tooltip: Omit;
+ tooltip: Tooltip;
};
const useStyles = makeStyles({
@@ -21,6 +20,7 @@ const useStyles = makeStyles({
display: "flex",
alignItems: "center",
justifyItems: "space-between",
+ height: "35px",
"& > div:first-child": {
// Tooltip text
marginLeft: "8px",
@@ -49,6 +49,7 @@ const useStyles = makeStyles({
lineHeight: "9px !important",
fontWeight: 500,
},
+ tooltipIcon: { width: "auto", height: "24px" },
});
export const BaseTooltipTitle = ({ tooltip }: Props): ReactElement => {
@@ -67,7 +68,6 @@ export const BaseTooltipTitle = ({ tooltip }: Props): ReactElement => {
{tooltip.shortcutSymbol.toUpperCase()}
-
{
- {tooltip.name}
+
+ {tooltip.name}
+
- {!tooltip.shortcut ? null : hasShortcutSymbol}
+ {tooltip.shortcut && hasShortcutSymbol}
+ {tooltip?.icon && (
+
+ )}
diff --git a/src/Card.tsx b/src/Card.tsx
index 4436f88..b75b365 100644
--- a/src/Card.tsx
+++ b/src/Card.tsx
@@ -21,6 +21,7 @@ interface Props extends CardProps {
warningDialog?: boolean;
isPinned?: boolean | null;
handlePin?: () => void;
+ backgroundColor?: string;
}
const CardIconButton = styled(IconButton)({
@@ -42,6 +43,7 @@ export function Card(props: Props): JSX.Element {
{props.children}
@@ -111,4 +116,5 @@ Card.defaultProps = {
warningDialog: null,
isPinned: null,
handlePin: null,
+ backgroundColor: "#FFFFFF",
};
diff --git a/src/Dialog.tsx b/src/Dialog.tsx
index 343ff31..01396ea 100644
--- a/src/Dialog.tsx
+++ b/src/Dialog.tsx
@@ -9,6 +9,7 @@ interface Props {
warningDialog?: boolean;
close?: boolean;
afterClose?: () => void;
+ backgroundColor?: string;
}
export function Dialog({
@@ -18,6 +19,7 @@ export function Dialog({
close,
warningDialog,
afterClose,
+ backgroundColor,
}: Props): ReactElement | null {
const [open, setOpen] = useState(false);
@@ -40,17 +42,6 @@ export function Dialog({
}
}, [close]);
- const dialogContent = (
-
- {children}
-
- );
-
return (
<>
{cloneElement(TriggerButton, {
@@ -60,8 +51,20 @@ export function Dialog({
if (onClick) onClick();
},
})}
-
- {dialogContent}
+
+
+ {children}
+
>
);
@@ -72,4 +75,5 @@ Dialog.defaultProps = {
close: null,
afterClose: null,
warningDialog: null,
+ backgroundColor: "inherit",
};
diff --git a/src/IconButton.tsx b/src/IconButton.tsx
index 7aa2bea..e6def00 100644
--- a/src/IconButton.tsx
+++ b/src/IconButton.tsx
@@ -17,6 +17,7 @@ export interface Tooltip {
name: string;
shortcut?: string;
shortcutSymbol?: string;
+ icon?: string;
}
export interface Props extends ButtonProps {
@@ -84,6 +85,7 @@ export const IconButton = (props: Props): ReactElement => {
>