%PDF- %PDF-
Direktori : /home/dopla/www/wp-content/plugins/ml-slider/extendify-sdk/src/components/notices/ |
Current File : /home/dopla/www/wp-content/plugins/ml-slider/extendify-sdk/src/components/notices/WelcomeNotice.js |
import { __ } from '@wordpress/i18n' import { Button } from '@wordpress/components' import { useUserStore } from '../../state/User' import { useGlobalStore } from '../../state/GlobalState' export default function WelcomeNotice() { const setOpen = useGlobalStore((state) => state.setOpen) const disableLibrary = () => { const button = document.getElementById( 'extendify-templates-inserter-btn', ) button.classList.add('invisible') useUserStore.setState({ enabled: false }) setOpen(false) } return ( <> <span className="text-black"> {__('Welcome to the Extendify Library', 'extendify-sdk')} </span> <span className="px-2 opacity-50" aria-hidden="true"> | </span> <div className="flex space-x-2 justify-center items-center"> <Button variant="link" className="text-black underline hover:no-underline p-0 h-auto" href={`https://extendify.com/welcome/?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=welcome-notice&utm_content=tell-me-more`} target="_blank"> {__('Tell me more', 'extendify-sdk')} </Button> <span className="font-bold" aria-hidden="true"> • </span> <Button variant="link" className="text-black underline hover:no-underline p-0 h-auto" onClick={disableLibrary}> {__('Turn off the library', 'extendify-sdk')} </Button> </div> </> ) }