mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
🎨 styles: product info detail
:%s
This commit is contained in:
1
src/components/hooks/index.ts
Normal file
1
src/components/hooks/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default as useModalCommon } from './useModalCommon'
|
@@ -4,7 +4,7 @@ interface Props {
|
||||
initialValue?: boolean,
|
||||
}
|
||||
|
||||
export const useModalCommon = ({ initialValue = false }: Props) => {
|
||||
const useModalCommon = ({ initialValue = false }: Props) => {
|
||||
const [visible, setVisible] = useState<boolean>(initialValue)
|
||||
|
||||
const openModal = (e?: any) => {
|
||||
@@ -21,3 +21,5 @@ export const useModalCommon = ({ initialValue = false }: Props) => {
|
||||
visible, openModal, closeModal
|
||||
}
|
||||
};
|
||||
|
||||
export default useModalCommon
|
Reference in New Issue
Block a user