| 1 |
import { __ } from '@wordpress/i18n'; |
| 2 |
import { PanelRow, TextControl } from '@wordpress/components'; |
| 3 |
|
| 4 |
export const PostDisplayControls = ({ attributes, onChange }) => ( |
| 5 |
<> |
| 6 |
<PanelRow> |
| 7 |
<TextControl |
| 8 |
label={__('Number of posts', 'top-10')} |
| 9 |
value={attributes.limit} |
| 10 |
onChange={onChange('limit')} |
| 11 |
help={__('Maximum number of posts to display', 'top-10')} |
| 12 |
/> |
| 13 |
</PanelRow> |
| 14 |
<PanelRow> |
| 15 |
<TextControl |
| 16 |
label={__('Offset', 'top-10')} |
| 17 |
value={attributes.offset} |
| 18 |
onChange={onChange('offset')} |
| 19 |
help={__('Number of posts to skip from the top', 'top-10')} |
| 20 |
/> |
| 21 |
</PanelRow> |
| 22 |
</> |
| 23 |
); |
| 24 |
|