@wordpress/block-library
Version:
Block library for the WordPress editor.
8 lines (7 loc) • 1.67 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../../../src/terms-query/edit/inspector-controls/order-control.js"],
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { SelectControl } from '@wordpress/components';\n\nexport default function OrderControl( { orderBy, order, onChange, ...props } ) {\n\treturn (\n\t\t<SelectControl\n\t\t\t__next40pxDefaultSize\n\t\t\toptions={ [\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Name: A \u2192 Z' ),\n\t\t\t\t\tvalue: 'name/asc',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Name: Z \u2192 A' ),\n\t\t\t\t\tvalue: 'name/desc',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Count, high to low' ),\n\t\t\t\t\tvalue: 'count/desc',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Count, low to high' ),\n\t\t\t\t\tvalue: 'count/asc',\n\t\t\t\t},\n\t\t\t] }\n\t\t\tvalue={ orderBy + '/' + order }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\tonChange( newOrderBy, newOrder );\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],
"mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,qBAAqB;AAI5B;AAFa,SAAR,aAA+B,EAAE,SAAS,OAAO,UAAU,GAAG,MAAM,GAAI;AAC9E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,uBAAqB;AAAA,MACrB,SAAU;AAAA,QACT;AAAA,UACC,OAAO,GAAI,kBAAc;AAAA,UACzB,OAAO;AAAA,QACR;AAAA,QACA;AAAA,UACC,OAAO,GAAI,kBAAc;AAAA,UACzB,OAAO;AAAA,QACR;AAAA,QACA;AAAA,UACC,OAAO,GAAI,oBAAqB;AAAA,UAChC,OAAO;AAAA,QACR;AAAA,QACA;AAAA,UACC,OAAO,GAAI,oBAAqB;AAAA,UAChC,OAAO;AAAA,QACR;AAAA,MACD;AAAA,MACA,OAAQ,UAAU,MAAM;AAAA,MACxB,UAAW,CAAE,UAAW;AACvB,cAAM,CAAE,YAAY,QAAS,IAAI,MAAM,MAAO,GAAI;AAClD,iBAAU,YAAY,QAAS;AAAA,MAChC;AAAA,MACE,GAAG;AAAA;AAAA,EACN;AAEF;",
"names": []
}