mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 07:25:48 +01:00
Buttons styling
This commit is contained in:
@@ -2,6 +2,7 @@ import { ActionIcon, Button, Tooltip } from '@mantine/core';
|
||||
import { openContextModal } from '@mantine/modals';
|
||||
import { IconApps } from '@tabler/icons';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useColorTheme } from '../../../../../tools/color';
|
||||
|
||||
interface AddElementActionProps {
|
||||
type: 'action-icon' | 'button';
|
||||
@@ -9,15 +10,16 @@ interface AddElementActionProps {
|
||||
|
||||
export const AddElementAction = ({ type }: AddElementActionProps) => {
|
||||
const { t } = useTranslation('layout/element-selector/selector');
|
||||
const { primaryColor, secondaryColor } = useColorTheme();
|
||||
|
||||
switch (type) {
|
||||
case 'button':
|
||||
return (
|
||||
<Tooltip label={t('actionIcon.tooltip')} withinPortal withArrow>
|
||||
<Button
|
||||
variant="default"
|
||||
variant="white"
|
||||
radius="md"
|
||||
color="blue"
|
||||
color={secondaryColor}
|
||||
style={{ height: 43 }}
|
||||
onClick={() =>
|
||||
openContextModal({
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { ActionIcon, Badge, Menu } from '@mantine/core';
|
||||
import { Badge, Button, Menu } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconInfoCircle, IconMenu2, IconSettings } from '@tabler/icons';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useColorTheme } from '../../../tools/color';
|
||||
import { AboutModal } from '../../About/AboutModal';
|
||||
import { SettingsDrawer } from '../../Settings/SettingsDrawer';
|
||||
import { ColorSchemeSwitch } from './SettingsMenu/ColorSchemeSwitch';
|
||||
@@ -10,14 +11,15 @@ export function SettingsMenu({ newVersionAvailable }: { newVersionAvailable: str
|
||||
const [drawerOpened, drawer] = useDisclosure(false);
|
||||
const { t } = useTranslation('common');
|
||||
const [aboutModalOpened, aboutModal] = useDisclosure(false);
|
||||
const { primaryColor, secondaryColor } = useColorTheme();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Menu width={250}>
|
||||
<Menu.Target>
|
||||
<ActionIcon variant="default" radius="md" size="xl" color="blue">
|
||||
<Button variant="white" radius="md" color={secondaryColor} style={{ height: 43 }}>
|
||||
<IconMenu2 />
|
||||
</ActionIcon>
|
||||
</Button>
|
||||
</Menu.Target>
|
||||
<Menu.Dropdown>
|
||||
<ColorSchemeSwitch />
|
||||
|
||||
Reference in New Issue
Block a user