Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /home/www/calvetrealty.com/wp-content/plugins/code-snippets/js/Edit/fields/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/www/calvetrealty.com/wp-content/plugins/code-snippets/js/Edit/fields/PriorityInput.tsx
import React from 'react'
import { __ } from '@wordpress/i18n'
import { getSnippetType } from '../../utils/snippets'
import { useSnippetForm } from '../SnippetForm/context'

export const PriorityInput: React.FC = () => {
	const { snippet, setSnippet, isReadOnly } = useSnippetForm()

	return 'html' === getSnippetType(snippet) ? null :
		<p
			className="snippet-priority"
			title={__('Snippets with a lower priority number will run before those with a higher number.', 'code-snippets')}
		>
			<label htmlFor="snippet_priority">{`${__('Priority', 'code-snippets')} `}</label>
			<input
				type="number"
				id="snippet_priority"
				name="snippet_priority"
				value={snippet.priority}
				disabled={isReadOnly}
				onChange={event => setSnippet(previous => ({
					...previous,
					priority: parseInt(event.target.value, 10)
				}))}
			/>
		</p>
}

Hry