2018-07-09 15:46:31 +00:00
|
|
|
/** @format */
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { __ } from '@wordpress/i18n';
|
2018-07-20 18:24:39 +00:00
|
|
|
import { Component, Fragment } from '@wordpress/element';
|
2018-07-25 14:25:08 +00:00
|
|
|
import Gridicon from 'gridicons';
|
2018-07-09 15:46:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2018-07-16 18:37:25 +00:00
|
|
|
import ActivityHeader from '../activity-header';
|
2018-07-25 14:25:08 +00:00
|
|
|
import SplitButton from 'components/split-button';
|
2018-07-09 15:46:31 +00:00
|
|
|
|
|
|
|
class ReviewsPanel extends Component {
|
|
|
|
render() {
|
2018-07-20 18:24:39 +00:00
|
|
|
return (
|
|
|
|
<Fragment>
|
|
|
|
<ActivityHeader title={ __( 'Reviews', 'wc-admin' ) } />
|
2018-07-25 14:25:08 +00:00
|
|
|
|
|
|
|
<SplitButton
|
|
|
|
isPrimary
|
|
|
|
mainLabel="Primary Button"
|
|
|
|
menuLabel="Select an action"
|
|
|
|
onClick={ () => alert( 'Primary Main Action clicked' ) }
|
|
|
|
controls={ [
|
|
|
|
{
|
|
|
|
label: 'Up',
|
|
|
|
onClick: () => alert( 'Primary Up clicked' ),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Right',
|
|
|
|
onClick: () => alert( 'Primary Right clicked' ),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Down',
|
|
|
|
icon: <Gridicon icon="arrow-down" />,
|
|
|
|
onClick: () => alert( 'Primary Down clicked' ),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Left',
|
|
|
|
icon: <Gridicon icon="arrow-left" />,
|
|
|
|
onClick: () => alert( 'Primary Left clicked' ),
|
|
|
|
},
|
|
|
|
] }
|
|
|
|
/>
|
|
|
|
|
|
|
|
<SplitButton
|
|
|
|
mainIcon={ <Gridicon icon="pencil" /> }
|
|
|
|
mainLabel="Secondary Button"
|
|
|
|
menuLabel="Select an action"
|
|
|
|
onClick={ () => alert( 'Secondary Main Action clicked' ) }
|
|
|
|
controls={ [
|
|
|
|
{
|
|
|
|
label: 'Up',
|
|
|
|
icon: <Gridicon icon="arrow-up" />,
|
|
|
|
onClick: () => alert( 'Secondary Up clicked' ),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Right',
|
|
|
|
onClick: () => alert( 'Secondary Right clicked' ),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Down',
|
|
|
|
icon: <Gridicon icon="arrow-down" />,
|
|
|
|
onClick: () => alert( 'Secondary Down clicked' ),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
icon: <Gridicon icon="arrow-left" />,
|
|
|
|
onClick: () => alert( 'Secondary Left clicked' ),
|
|
|
|
},
|
|
|
|
] }
|
|
|
|
/>
|
|
|
|
|
|
|
|
<SplitButton
|
|
|
|
mainIcon={ <Gridicon icon="pencil" /> }
|
|
|
|
menuLabel="Select an action"
|
|
|
|
onClick={ () => alert( 'Icon Only Action clicked' ) }
|
|
|
|
controls={ [
|
|
|
|
{
|
|
|
|
label: 'Up',
|
|
|
|
icon: <Gridicon icon="arrow-up" />,
|
|
|
|
onClick: () => alert( 'Icon Only Up clicked' ),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Right',
|
|
|
|
onClick: () => alert( 'Icon Only Right clicked' ),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Down',
|
|
|
|
icon: <Gridicon icon="arrow-down" />,
|
|
|
|
onClick: () => alert( 'Icon Only Down clicked' ),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
icon: <Gridicon icon="arrow-left" />,
|
|
|
|
onClick: () => alert( 'Icon Only Left clicked' ),
|
|
|
|
},
|
|
|
|
] }
|
2018-07-20 18:24:39 +00:00
|
|
|
/>
|
|
|
|
</Fragment>
|
|
|
|
);
|
2018-07-09 15:46:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ReviewsPanel;
|