PluginProbe
Extendify / 3.1.5
Extendify v3.1.5
3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 All 126 releases
extendify / src / Launch / components / PageSelectButton.jsx

PageSelectButton.jsx in Extendify 3.1.5, at src/Launch/components/PageSelectButton.jsx

46 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { CheckboxInput } from '@launch/components/CheckboxInput';
2 import { __ } from '@wordpress/i18n';
3 import classNames from 'classnames';
4
5 export const PageSelectButton = ({
6 page,
7 previewing,
8 onPreview,
9 checked,
10 onChange,
11 forceChecked = false,
12 }) => (
13 <div className="flex items-center rounded-sm overflow-hidden">
14 <div
15 className={classNames(
16 'grow overflow-hidden text-gray-900 border border-gray-300 border-e-0 rounded-s-sm',
17 {
18 'bg-gray-300': forceChecked,
19 },
20 )}
21 >
22 <CheckboxInput
23 label={page.name}
24 slug={page.slug}
25 checked={checked}
26 onChange={onChange}
27 locked={forceChecked}
28 />
29 </div>
30
31 <button
32 type="button"
33 className={classNames(
34 'text-base leading-tight hidden shrink items-center border px-4 py-3 lg:flex overflow-hidden rounded-e-sm',
35 {
36 'bg-gray-100 text-gray-800 border-gray-300': !previewing,
37 'bg-design-main text-white border-design-main': previewing,
38 },
39 )}
40 onClick={onPreview}
41 >
42 {__('Preview', 'extendify-local')}
43 </button>
44 </div>
45 );
46