From cea094cd8958b7789ec634932bc6b4a155302596 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Wed, 28 May 2025 11:59:12 +0530 Subject: [PATCH] added float contaxt , action can take form any component --- src/Context/FabContext.jsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/Context/FabContext.jsx diff --git a/src/Context/FabContext.jsx b/src/Context/FabContext.jsx new file mode 100644 index 00000000..7151e6d7 --- /dev/null +++ b/src/Context/FabContext.jsx @@ -0,0 +1,15 @@ +import React, { createContext, useContext, useState } from "react"; + +const FabContext = createContext(); + +export const FabProvider = ({ children }) => { + const [actions, setActions] = useState([]); + + return ( + + {children} + + ); +}; + +export const useFab = () => useContext(FabContext); \ No newline at end of file