import React, { useId } from 'react' import { __ } from '@wordpress/i18n' import { useSnippetForm } from '../../SnippetForm/WithSnippetFormContext' import { Tooltip } from '../../../common/Tooltip' export const MultisiteSharingSettings: React.FC = () => { const { snippet, setSnippet, isReadOnly } = useSnippetForm() const sharingId = useId() return (
{__('Instead of running on every site, allow this snippet to be activated on individual sites on the network.', 'code-snippets')} {snippet.shared_network ? __('Enabled', 'code-snippets') : __('Disabled', 'code-snippets')} setSnippet(previous => ({ ...previous, active: false, shared_network: event.target.checked }))} />
) }