UNPKG

@ducor/react

Version:

admin template ui interface

36 lines (35 loc) 1.2 kB
import color from "@ducor/color"; const borders = { default: " border-gray-200 dark:border-gray-600", primary: " border-blue-200 dark:border-blue-400/50", info: " border-teal-400 dark:border-teal-600/50", success: " border-green-300 dark:border-green-400/50", warning: " border-yellow-300 dark:border-yellow-400/50", danger: " border-red-300 dark:border-red-600/50", secondary: " border-purple-200 dark:border-purple-400/50", }; const textColor = { default: "text-gray-700 dark:text-gray-200", primary: "text-blue-500 dark:text-blue-400", secondary: "text-purple-500 dark:text-purple-400", info: "text-teal-500 dark:text-teal-400", success: "text-green-500 dark:text-green-400", warning: "text-yellow-500 dark:text-yellow-400", danger: "text-red-500 dark:text-red-400", }; const colors = { borders, textColor, }; export const getColor = ({ variant, color: colorName, disabled, active, }) => { let colorType = "normal"; if (disabled) { colorType = "disabled"; } else if (active) { colorType = "active"; } return color(colorName, variant, colorType); }; export default colors; // server run koren