PluginProbe
Code Snippets / 3.5.0
Code Snippets v3.5.0
3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 3.0.1 All 64 releases
code-snippets / js / Edit / fields / NameInput.tsx

NameInput.tsx in Code Snippets 3.5.0, at js/Edit/fields/NameInput.tsx

23 lines 685 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from 'react'
2 import { __ } from '@wordpress/i18n'
3 import { SnippetInputProps } from '../../types/SnippetInputProps'
4
5 export const NameInput: React.FC<SnippetInputProps> = ({ snippet, setSnippet, isReadOnly }) =>
6 <div id="titlediv">
7 <div id="titlewrap">
8 <label htmlFor="title" className="screen-reader-text">
9 {__('Name', 'code-snippets')}
10 </label>
11 <input
12 id="title"
13 type="text"
14 name="snippet_name"
15 autoComplete="off"
16 value={snippet.name}
17 disabled={isReadOnly}
18 placeholder={__('Enter title here', 'code-snippets')}
19 onChange={event => setSnippet(previous => ({ ...previous, name: event.target.value }))}
20 />
21 </div>
22 </div>
23