mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 23:15:46 +01:00
Undo ugly button styling
This commit is contained in:
@@ -2,7 +2,6 @@ import { ActionIcon, Button, Tooltip } from '@mantine/core';
|
|||||||
import { openContextModal } from '@mantine/modals';
|
import { openContextModal } from '@mantine/modals';
|
||||||
import { IconApps } from '@tabler/icons';
|
import { IconApps } from '@tabler/icons';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
import { useColorTheme } from '../../../../../tools/color';
|
|
||||||
|
|
||||||
interface AddElementActionProps {
|
interface AddElementActionProps {
|
||||||
type: 'action-icon' | 'button';
|
type: 'action-icon' | 'button';
|
||||||
@@ -10,16 +9,14 @@ interface AddElementActionProps {
|
|||||||
|
|
||||||
export const AddElementAction = ({ type }: AddElementActionProps) => {
|
export const AddElementAction = ({ type }: AddElementActionProps) => {
|
||||||
const { t } = useTranslation('layout/element-selector/selector');
|
const { t } = useTranslation('layout/element-selector/selector');
|
||||||
const { primaryColor, secondaryColor } = useColorTheme();
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'button':
|
case 'button':
|
||||||
return (
|
return (
|
||||||
<Tooltip label={t('actionIcon.tooltip')} withinPortal withArrow>
|
<Tooltip label={t('actionIcon.tooltip')} withinPortal withArrow>
|
||||||
<Button
|
<Button
|
||||||
variant="white"
|
|
||||||
radius="md"
|
radius="md"
|
||||||
color={secondaryColor}
|
variant="default"
|
||||||
style={{ height: 43 }}
|
style={{ height: 43 }}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
openContextModal({
|
openContextModal({
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { useScreenSmallerThan } from '../../../../../hooks/useScreenSmallerThan'
|
|||||||
|
|
||||||
import { useEditModeStore } from '../../../../Dashboard/Views/useEditModeStore';
|
import { useEditModeStore } from '../../../../Dashboard/Views/useEditModeStore';
|
||||||
import { AddElementAction } from '../AddElementAction/AddElementAction';
|
import { AddElementAction } from '../AddElementAction/AddElementAction';
|
||||||
import { useColorTheme } from '../../../../../tools/color';
|
|
||||||
|
|
||||||
export const ToggleEditModeAction = () => {
|
export const ToggleEditModeAction = () => {
|
||||||
const { enabled, toggleEditMode } = useEditModeStore();
|
const { enabled, toggleEditMode } = useEditModeStore();
|
||||||
@@ -56,15 +55,13 @@ export const ToggleEditModeAction = () => {
|
|||||||
hideNotification('toggle-edit-mode');
|
hideNotification('toggle-edit-mode');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const { primaryColor, secondaryColor } = useColorTheme();
|
|
||||||
|
|
||||||
const ToggleButtonDesktop = () => (
|
const ToggleButtonDesktop = () => (
|
||||||
<Tooltip label={enabled ? t('button.enabled') : t('button.disabled')}>
|
<Tooltip label={enabled ? t('button.enabled') : t('button.disabled')}>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => toggleButtonClicked()}
|
onClick={() => toggleButtonClicked()}
|
||||||
variant="white"
|
|
||||||
radius="md"
|
radius="md"
|
||||||
color={secondaryColor}
|
variant="default"
|
||||||
style={{ height: 43 }}
|
style={{ height: 43 }}
|
||||||
>
|
>
|
||||||
{enabled ? <IconEditCircleOff /> : <IconEditCircle />}
|
{enabled ? <IconEditCircleOff /> : <IconEditCircle />}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { Badge, Button, Menu } from '@mantine/core';
|
|||||||
import { useDisclosure } from '@mantine/hooks';
|
import { useDisclosure } from '@mantine/hooks';
|
||||||
import { IconInfoCircle, IconMenu2, IconSettings } from '@tabler/icons';
|
import { IconInfoCircle, IconMenu2, IconSettings } from '@tabler/icons';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
import { useColorTheme } from '../../../tools/color';
|
|
||||||
import { AboutModal } from '../../About/AboutModal';
|
import { AboutModal } from '../../About/AboutModal';
|
||||||
import { SettingsDrawer } from '../../Settings/SettingsDrawer';
|
import { SettingsDrawer } from '../../Settings/SettingsDrawer';
|
||||||
import { ColorSchemeSwitch } from './SettingsMenu/ColorSchemeSwitch';
|
import { ColorSchemeSwitch } from './SettingsMenu/ColorSchemeSwitch';
|
||||||
@@ -11,13 +10,12 @@ export function SettingsMenu({ newVersionAvailable }: { newVersionAvailable: str
|
|||||||
const [drawerOpened, drawer] = useDisclosure(false);
|
const [drawerOpened, drawer] = useDisclosure(false);
|
||||||
const { t } = useTranslation('common');
|
const { t } = useTranslation('common');
|
||||||
const [aboutModalOpened, aboutModal] = useDisclosure(false);
|
const [aboutModalOpened, aboutModal] = useDisclosure(false);
|
||||||
const { primaryColor, secondaryColor } = useColorTheme();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Menu width={250}>
|
<Menu width={250}>
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<Button variant="white" radius="md" color={secondaryColor} style={{ height: 43 }}>
|
<Button variant="default" radius="md" style={{ height: 43 }}>
|
||||||
<IconMenu2 />
|
<IconMenu2 />
|
||||||
</Button>
|
</Button>
|
||||||
</Menu.Target>
|
</Menu.Target>
|
||||||
|
|||||||
Reference in New Issue
Block a user