prefer arrow functions

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-05-12 15:24:15 +02:00
parent afa677a375
commit cb7976bd3d
11 changed files with 134 additions and 121 deletions

View File

@ -1,9 +1,7 @@
import { type RecursiveKeyValuePair } from 'tailwindcss/types/config';
/** https://tailwindcss.com/docs/customizing-colors#using-css-variables */
function withOpacityValue(variable: string): string {
return `rgb(var(${variable}) / <alpha-value>)`;
}
const withOpacityValue = (variable: string): string => `rgb(var(${variable}) / <alpha-value>)`;
/** Parse a single color as a CSS variable. */
const toColorVariable = (colorName: string, tint: number | null = null): string => {
@ -41,7 +39,4 @@ const parseColorMatrix = (colorMatrix: ColorMatrix): RecursiveKeyValuePair => {
}, {});
};
export {
withOpacityValue,
parseColorMatrix,
};
export { withOpacityValue, parseColorMatrix };