PluginProbe
Extendify / 2.2.0
Extendify v2.2.0
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 2.2.0, at src/Launch/components/PageSelectButton.jsx

41 lines 947 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import classNames from 'classnames';
2 import { CheckboxInput } from '@launch/components/CheckboxInput';
3 import { PreviewIcon } from '@launch/svg';
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 border border-gray-300">
14 <div
15 className={classNames('grow overflow-hidden text-gray-900', {
16 'bg-gray-300': forceChecked,
17 })}>
18 <CheckboxInput
19 label={page.name}
20 slug={page.slug}
21 checked={checked}
22 onChange={onChange}
23 locked={forceChecked}
24 />
25 </div>
26
27 <button
28 type="button"
29 className={classNames(
30 'hidden h-full min-h-6 min-w-6 shrink items-center border-l border-gray-300 px-4 py-3 lg:flex',
31 {
32 'bg-gray-100 text-gray-800': !previewing,
33 'bg-design-main text-white': previewing,
34 },
35 )}
36 onClick={onPreview}>
37 <PreviewIcon className="h-6 w-6" />
38 </button>
39 </div>
40 );
41