import React from 'react'; import styled from 'styled-components'; import { IconButton } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; const StyledAudienceSort = styled.span` display: flex; flex-direction: row; align-items: center; .audience-sort-order { &__number { font-weight: bold; flex: 1; } &__controls { flex: 1; button { padding: 3px; } } &__up { margin-bottom: 2px; } } `; interface Props { index: number; canMoveUp: boolean; canMoveDown: boolean; onMoveUp: () => void; onMoveDown: () => void; } /** * The audience sort buttons component. * * @param {Object} props Component props. * @returns {React.ReactNode} Audience sorting component. */ const AudienceSort = ( props: Props ) => { const { canMoveDown, canMoveUp, index, onMoveDown, onMoveUp, } = props; return ( { index + 1 } ); }; export default AudienceSort;