# code-snippets/3.10.0-beta.1/js/components/EditMenu/EditorSidebar/controls/MultisiteSharingSettings.tsx

Code Snippets, version 3.10.0-beta.1. 43 lines.

- Page: https://pluginprobe.com/plugins/code-snippets/3.10.0-beta.1/code/js/components/EditMenu/EditorSidebar/controls/MultisiteSharingSettings.tsx
- Raw: https://pluginprobe.com/plugins/code-snippets/3.10.0-beta.1/raw/js/components/EditMenu/EditorSidebar/controls/MultisiteSharingSettings.tsx
- Modified: 2026-06-19T15:56:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-snippets/3.10.0-beta.1/code/js/components/EditMenu/EditorSidebar/controls/MultisiteSharingSettings.tsx#L10-L20`.

```tsx
import React 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()

	return (
		<div className="inline-form-field activation-switch-container">
			<label htmlFor="snippet_sharing" id="snippet-sharing-label">
				{__('Share with Subsites', 'code-snippets')}
			</label>

			<Tooltip inline start>
				{__('Instead of running on every site, allow this snippet to be activated on individual sites on the network.', 'code-snippets')}
			</Tooltip>

			<span className="sharing-status-text">
				{snippet.shared_network
					? __('Enabled', 'code-snippets')
					: __('Disabled', 'code-snippets')}
			</span>

			<input
				id="snippet_sharing"
				name="snippet_sharing"
				type="checkbox"
				className="switch"
				checked={!!snippet.shared_network}
				disabled={isReadOnly}
				aria-labelledby="snippet-sharing-label"
				onChange={event =>
					setSnippet(previous => ({
						...previous,
						active: false,
						shared_network: event.target.checked
					}))}
			/>
		</div>
	)
}

```
