PluginProbe
Highlighting Code Block / 1.2.4
Highlighting Code Block v1.2.4
2.2.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.4.0 All 41 releases
highlighting-code-block / src / js / code-block / _panels.js

_panels.js in Highlighting Code Block 1.2.4, at src/js/code-block/_panels.js

68 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WordPress dependencies
3 */
4 import { __ } from '@wordpress/i18n';
5 import { PanelBody, RadioControl } from '@wordpress/components';
6
7 /**
8 * テキストドメイン
9 */
10 const textDomain = 'loos-hcb';
11
12 // コンポーネントを export
13 export default (props) => {
14 const { attributes, setAttributes } = props;
15 const { isLineShow, isShowLang } = attributes;
16
17 return (
18 <PanelBody title={__('HCB settings', textDomain)} initialOpen={true}>
19 <RadioControl
20 label={__(
21 'Settings for displaying the number of lines',
22 textDomain
23 )} // 行数の表示に関する設定
24 selected={isLineShow}
25 options={[
26 {
27 label: __('Do not set individually', textDomain), //個別で設定はしない
28 value: 'undefined',
29 },
30 {
31 label: __('Display row count', textDomain), //行数を表示する
32 value: 'on',
33 },
34 {
35 label: __('Do not display row count', textDomain), //行数を表示しない
36 value: 'off',
37 },
38 ]}
39 onChange={(val) => {
40 setAttributes({ isLineShow: val });
41 }}
42 />
43
44 <RadioControl
45 label={__('Settings for displaying language name', textDomain)} // 言語名の表示に関する設定
46 selected={isShowLang}
47 options={[
48 {
49 label: __('Do not set individually', textDomain), //個別で設定はしない
50 value: '',
51 },
52 {
53 label: __('Display language', textDomain), //言語を表示する
54 value: '1',
55 },
56 {
57 label: __('Do not display language', textDomain), //言語を表示しない
58 value: '0',
59 },
60 ]}
61 onChange={(val) => {
62 setAttributes({ isShowLang: val });
63 }}
64 />
65 </PanelBody>
66 );
67 };
68