Expose more methods, support disabled items (#4954)

This commit is contained in:
Eric Bailey 2024-08-19 14:21:29 -05:00 committed by GitHub
parent f235be9819
commit e54298ec2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 71 additions and 25 deletions

View file

@ -1,8 +1,12 @@
import React from 'react'
import type {ContextType} from '#/components/Menu/types'
import type {ContextType, ItemContextType} from '#/components/Menu/types'
export const Context = React.createContext<ContextType>({
// @ts-ignore
control: null,
})
export const ItemContext = React.createContext<ItemContextType>({
disabled: false,
})