mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
fixed typing
This commit is contained in:
parent
0da13b2308
commit
0826aa1003
@ -15,9 +15,20 @@ import { TagsProvider } from '#components/Map/hooks/useTags'
|
||||
|
||||
import { AppStateProvider } from './hooks/useAppState'
|
||||
|
||||
import type { CloseButtonProps } from 'react-toastify'
|
||||
|
||||
// Helper context to determine if the ContextWrapper is already present.
|
||||
const ContextCheckContext = createContext(false)
|
||||
|
||||
const CloseButton = ({ closeToast }: CloseButtonProps) => (
|
||||
<button
|
||||
className='tw-btn tw-btn-sm tw-btn-circle tw-btn-ghost tw-absolute tw-right-2 tw-top-2 focus:tw-outline-none'
|
||||
onClick={closeToast}
|
||||
>
|
||||
✕
|
||||
</button>
|
||||
)
|
||||
|
||||
export const ContextWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||
const isWrapped = useContext(ContextCheckContext)
|
||||
|
||||
@ -67,11 +78,7 @@ export const Wrappers = ({ children }) => {
|
||||
draggable
|
||||
pauseOnHover
|
||||
theme='light'
|
||||
closeButton={
|
||||
<button className='tw-btn tw-btn-sm tw-btn-circle tw-btn-ghost tw-absolute tw-right-2 tw-top-2 focus:tw-outline-none'>
|
||||
✕
|
||||
</button>
|
||||
}
|
||||
closeButton={CloseButton}
|
||||
/>
|
||||
{children}
|
||||
</QuestsProvider>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user