fui-fancyui
Version:
FancyUI Libary
17 lines (16 loc) • 726 B
JavaScript
import { css as m } from "styled-components";
import { getBackgroundColor as c, getTextColor as g } from "../../colorCalculatorForComponent/colorCalculatorForComponent.js";
import { generateStateStyle as i } from "./generateHoverActiveColor.js";
const h = (t) => {
const { $themeType: o, theme: e, $layer: r = 0, $textColor: n, $backgroundState: a } = t, l = c({ theme: e, $themeType: o ?? "primary", $layer: r ?? 0 });
return m`
border: none;
background-color: ${l};
color: ${n ? e.color[n][0] : g({ theme: e, $themeType: o ?? "primary", $textLayer: r ?? 0, turnColorTheme: !0 })};
/* This generate the hover / active style if its needed */
${a && i(t)}
`;
};
export {
h as generateNormalStyle
};