Remove chevrons
This commit is contained in:
James Koster 2020-07-17 13:47:18 +01:00 committed by GitHub
parent eb211b6b0b
commit 2fc2ad6ca9
1 changed files with 10 additions and 4 deletions

View File

@ -13,13 +13,13 @@ import {
megaphone, megaphone,
box, box,
brush, brush,
home,
shipping, shipping,
percent, percent,
payment, payment,
pencil, pencil,
lifesaver, lifesaver,
external, external,
chevronRight,
} from '@wordpress/icons'; } from '@wordpress/icons';
import { partial } from 'lodash'; import { partial } from 'lodash';
@ -91,13 +91,15 @@ function getItems( props ) {
type: 'external', type: 'external',
href: 'https://woocommerce.com/my-account/create-a-ticket/', href: 'https://woocommerce.com/my-account/create-a-ticket/',
icon: lifesaver, icon: lifesaver,
after: <Icon icon={ external } />,
listItemTag: 'support', listItemTag: 'support',
}, },
{ {
title: __( 'View my store', 'woocommerce-admin' ), title: __( 'View my store', 'woocommerce-admin' ),
type: 'external', type: 'external',
href: props.getSetting( 'siteUrl' ), href: props.getSetting( 'siteUrl' ),
icon: external, icon: home,
after: <Icon icon={ external } />,
listItemTag: 'view-store', listItemTag: 'view-store',
}, },
]; ];
@ -157,9 +159,13 @@ function getLinkTypeAndHref( item ) {
function getListItems( props ) { function getListItems( props ) {
return getItems( props ).map( ( item ) => { return getItems( props ).map( ( item ) => {
return { return {
title: <Text as="div" variant="button">{ item.title }</Text>, title: (
<Text as="div" variant="button">
{ item.title }
</Text>
),
before: <Icon icon={ item.icon } />, before: <Icon icon={ item.icon } />,
after: <Icon icon={ chevronRight } />, after: item.after,
...getLinkTypeAndHref( item ), ...getLinkTypeAndHref( item ),
listItemTag: item.listItemTag, listItemTag: item.listItemTag,
onClick: partial( handleOnItemClick, props ), onClick: partial( handleOnItemClick, props ),