diff --git a/packages/siera-desktop/src/ui/App.tsx b/packages/siera-desktop/src/ui/App.tsx index 0fc8b72..01c27c8 100644 --- a/packages/siera-desktop/src/ui/App.tsx +++ b/packages/siera-desktop/src/ui/App.tsx @@ -68,7 +68,7 @@ export const App = () => { > - + diff --git a/packages/siera-ui/src/SieraUiApp.tsx b/packages/siera-ui/src/SieraUiApp.tsx index 667377a..3dd32e0 100644 --- a/packages/siera-ui/src/SieraUiApp.tsx +++ b/packages/siera-ui/src/SieraUiApp.tsx @@ -11,7 +11,9 @@ import { sieraUiTheme } from './SieraUiTheme' import { GlobalErrorHandler } from './components/GlobalErrorHandler' import { UpdateNotifierModal } from './components/UpdateNotifierModal' import { useConfigUnsafe } from './contexts/ConfigProvider' -import { CreateAgentModal, PresentInviteModal, ConfirmActionModal } from './modals' +import { ConfirmActionModal } from './modals/ConfirmActionModal' +import { CreateAgentModal } from './modals/CreateAgentModal' +import { PresentInviteModal } from './modals/PresentInviteModal' interface SieraUiAppProps { router: RouterProviderProps['router'] diff --git a/packages/siera-ui/src/SieraUiTheme.ts b/packages/siera-ui/src/SieraUiTheme.ts index 5a1a072..172b527 100644 --- a/packages/siera-ui/src/SieraUiTheme.ts +++ b/packages/siera-ui/src/SieraUiTheme.ts @@ -30,6 +30,10 @@ export const sieraUiTheme = (colorScheme: ColorScheme): MantineThemeOverride => dropdown: { backgroundColor: theme.colorScheme === 'dark' ? theme.colors.backgroundOne[7] : '#ffffff', }, + item: { + padding: '0.4rem 0.6rem', + minWidth: '8rem', + }, }), }, @@ -39,6 +43,7 @@ export const sieraUiTheme = (colorScheme: ColorScheme): MantineThemeOverride => fontWeight: 700, fontSize: '1.7rem', padding: `0 ${theme.spacing.xl}px`, + color: theme.colors.textOne[7], }, modal: { border: `1px solid ${theme.colors.backgroundOne[6]}`, diff --git a/packages/siera-ui/src/components/RecordActions.tsx b/packages/siera-ui/src/components/RecordActions.tsx index 47dffb3..649782b 100644 --- a/packages/siera-ui/src/components/RecordActions.tsx +++ b/packages/siera-ui/src/components/RecordActions.tsx @@ -2,7 +2,7 @@ import { ActionIcon, createStyles, Group, Loader } from '@mantine/core' import { IconTrash } from '@tabler/icons' import React from 'react' -import { openConfirmActionModal } from '../modals' +import { openConfirmActionModal } from '../modals/ConfirmActionModal' import { PrimaryButton, SecondaryButton } from './generic' @@ -28,9 +28,14 @@ export const RecordActions = ({ onAccept, onDecline, onDelete, isLoading, propag returnFn() } - const dangerAction = (returnFn: () => void) => (event: React.MouseEvent) => { + const dangerAction = (confirmMethod: () => void) => (event: React.MouseEvent) => { !propagateEvent && event.stopPropagation() - openConfirmActionModal('Delete record', 'Are you sure you want to delete this record?', returnFn) + openConfirmActionModal({ + title: 'Delete record', + description: 'Are you sure you want to delete this record?', + confirmLabel: 'Delete', + onConfirm: confirmMethod, + }) } const actions = [ diff --git a/packages/siera-ui/src/components/generic/buttons/Buttons.tsx b/packages/siera-ui/src/components/generic/buttons/Buttons.tsx index 1de982a..35c3ea3 100644 --- a/packages/siera-ui/src/components/generic/buttons/Buttons.tsx +++ b/packages/siera-ui/src/components/generic/buttons/Buttons.tsx @@ -2,6 +2,7 @@ import type { ButtonProps } from '@mantine/core' import type { ButtonHTMLAttributes } from 'react' import { Button, createStyles } from '@mantine/core' +import { useColorScheme } from '@mantine/hooks' import { IconArrowLeft, IconPlus } from '@tabler/icons' import React from 'react' @@ -43,12 +44,22 @@ type PrimaryButtonProps = StandardButton & { } export const PrimaryButton = (props: PrimaryButtonProps) => { + const colorScheme = useColorScheme() const { classes, cx } = useStyles() const { withPlusIcon } = props const plusButton = withPlusIcon && - return