All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.esm.styled-system.use-recipe.js Maven / Gradle / Ivy

Go to download

Responsive and accessible React UI components built with React and Emotion

The newest version!
"use strict";
"use client";
import { useMemo } from 'react';
import { useChakraContext } from './provider.js';

function useRecipe(options) {
  const { key, recipe: recipeProp } = options;
  const sys = useChakraContext();
  return useMemo(() => {
    const recipe = recipeProp || (key != null ? sys.getRecipe(key) : {});
    return sys.cva(structuredClone(recipe));
  }, [key, recipeProp, sys]);
}

export { useRecipe };




© 2015 - 2025 Weber Informatics LLC | Privacy Policy