UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

21 lines (19 loc) 621 B
import { useSystem } from "../system/system-provider.js"; import { useTheme } from "../system/theme-provider.js"; import { css as css$1 } from "./css.js"; import { useMemo } from "react"; import { css } from "@emotion/css"; //#region src/core/css/use-css.ts const useCSS = (cssObject = {}) => { const system = useSystem(); const { theme } = useTheme(); return useMemo(() => getCSS(system, theme)(cssObject), [ cssObject, system, theme ]); }; const getCSS = (system, theme) => (cssObject = {}) => css(css$1(system, theme)(cssObject)); //#endregion export { getCSS, useCSS }; //# sourceMappingURL=use-css.js.map