feat(twenty-front/workspace-menu): improve workspace menu (#10642)
New workspace menu
This commit is contained in:
@ -5,6 +5,7 @@ import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMembe
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';
|
||||
import { ColorScheme } from '@/workspace-member/types/WorkspaceMember';
|
||||
import { IconComponent, IconMoon, IconSun, IconSunMoon } from 'twenty-ui';
|
||||
|
||||
export const useColorScheme = () => {
|
||||
const [currentWorkspaceMember, setCurrentWorkspaceMember] = useRecoilState(
|
||||
@ -45,8 +46,27 @@ export const useColorScheme = () => {
|
||||
],
|
||||
);
|
||||
|
||||
const colorSchemeList: Array<{
|
||||
id: ColorScheme;
|
||||
icon: IconComponent;
|
||||
}> = [
|
||||
{
|
||||
id: 'System',
|
||||
icon: IconSunMoon,
|
||||
},
|
||||
{
|
||||
id: 'Dark',
|
||||
icon: IconMoon,
|
||||
},
|
||||
{
|
||||
id: 'Light',
|
||||
icon: IconSun,
|
||||
},
|
||||
];
|
||||
|
||||
return {
|
||||
colorScheme,
|
||||
setColorScheme,
|
||||
colorSchemeList,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user