import React from 'react'
import {
AssetsRecoilRoot,
AssetsModal,
useAssetsModalState,
} from '@21epub/resource-lib'
const Button = () => {
const [assetsModalState, dispatch] = useAssetsModalState({
visible: false,
type: 'image',
})
return (
<button onClick={() => dispatch({ visible: !assetsModalState.visible })} />
)
}
const App = () => (
<AssetsRecoilRoot>
<AssetsModal getPath={() => ''} />
<Button />
</AssetsRecoilRoot>
)
export default App
@21epub/resource-lib
4.12.2 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i @21epub/resource-lib
Weekly Downloads
13
Version
4.12.2
License
none
Unpacked Size
368 kB
Total Files
63