UNPKG

@wordpress/block-library

Version:
1 lines • 1.18 kB
{"version":3,"file":"sticky-control.mjs","names":["WCSelectControl"],"sources":["../../../../src/query/edit/inspector-controls/sticky-control.jsx"],"sourcesContent":["import { SelectControl as WCSelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst stickyOptions = [\n\t{ label: __( 'Include' ), value: '' },\n\t{ label: __( 'Ignore' ), value: 'ignore' },\n\t{ label: __( 'Exclude' ), value: 'exclude' },\n\t{ label: __( 'Only' ), value: 'only' },\n];\n\nexport default function StickyControl( { value, onChange } ) {\n\treturn (\n\t\t<WCSelectControl\n\t\t\tlabel={ __( 'Sticky posts' ) }\n\t\t\toptions={ stickyOptions }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\thelp={ __(\n\t\t\t\t'Sticky posts always appear first, regardless of their publish date.'\n\t\t\t) }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;AAGA,MAAM,gBAAgB;CACrB;EAAE,OAAO,GAAI,SAAU;EAAG,OAAO;CAAG;CACpC;EAAE,OAAO,GAAI,QAAS;EAAG,OAAO;CAAS;CACzC;EAAE,OAAO,GAAI,SAAU;EAAG,OAAO;CAAU;CAC3C;EAAE,OAAO,GAAI,MAAO;EAAG,OAAO;CAAO;AACtC;AAEA,SAAwB,cAAe,EAAE,OAAO,YAAa;CAC5D,OACC,oBAACA,eAAD;EACC,OAAQ,GAAI,cAAe;EAC3B,SAAU;EACF;EACG;EACX,MAAO,GACN,qEACD;CACA,CAAA;AAEH"}