♻️ Improved code structure for layout, remove most settings components
This commit is contained in:
13
src/components/layout/Common/useGradient.tsx
Normal file
13
src/components/layout/Common/useGradient.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { MantineGradient } from '@mantine/core';
|
||||
|
||||
import { useColorTheme } from '../../../tools/color';
|
||||
|
||||
export const usePrimaryGradient = (): MantineGradient => {
|
||||
const { primaryColor, secondaryColor } = useColorTheme();
|
||||
|
||||
return {
|
||||
from: primaryColor,
|
||||
to: secondaryColor,
|
||||
deg: 145,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user