mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-06-18 12:15:10 -04:00
chore(lint): switched to a better lint config
This commit is contained in:
parent
4d2b037dbe
commit
33c9b6643f
178 changed files with 4105 additions and 3371 deletions
|
@ -2,7 +2,7 @@ import { darken, lighten } from '../color/color.models';
|
|||
import { defineThemes } from '../theme/theme.models';
|
||||
import { appThemes } from '../theme/themes';
|
||||
|
||||
const createState = ({
|
||||
function createState({
|
||||
textColor,
|
||||
backgroundColor,
|
||||
hoverBackground,
|
||||
|
@ -10,20 +10,22 @@ const createState = ({
|
|||
pressedBackground,
|
||||
pressedTextColor = textColor,
|
||||
}: {
|
||||
textColor: string;
|
||||
backgroundColor: string;
|
||||
hoverBackground: string;
|
||||
hoveredTextColor?: string;
|
||||
pressedBackground: string;
|
||||
pressedTextColor?: string;
|
||||
}) => ({
|
||||
textColor,
|
||||
backgroundColor,
|
||||
hover: { textColor: hoveredTextColor, backgroundColor: hoverBackground },
|
||||
pressed: { textColor: pressedTextColor, backgroundColor: pressedBackground },
|
||||
});
|
||||
textColor: string
|
||||
backgroundColor: string
|
||||
hoverBackground: string
|
||||
hoveredTextColor?: string
|
||||
pressedBackground: string
|
||||
pressedTextColor?: string
|
||||
}) {
|
||||
return {
|
||||
textColor,
|
||||
backgroundColor,
|
||||
hover: { textColor: hoveredTextColor, backgroundColor: hoverBackground },
|
||||
pressed: { textColor: pressedTextColor, backgroundColor: pressedBackground },
|
||||
};
|
||||
}
|
||||
|
||||
const createTheme = ({ style }: { style: 'light' | 'dark' }) => {
|
||||
function createTheme({ style }: { style: 'light' | 'dark' }) {
|
||||
const theme = appThemes[style];
|
||||
|
||||
return {
|
||||
|
@ -95,7 +97,7 @@ const createTheme = ({ style }: { style: 'light' | 'dark' }) => {
|
|||
}),
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export const { useTheme } = defineThemes({
|
||||
dark: createTheme({ style: 'dark' }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue