Update chart button active state for dashboard charts (https://github.com/woocommerce/woocommerce-admin/pull/1202)
* Update chart button active state for dashboard charts * Add default active state when no query is present
This commit is contained in:
parent
8dc3398636
commit
2d5e592a10
|
@ -80,7 +80,7 @@ class DashboardCharts extends Component {
|
|||
>
|
||||
<IconButton
|
||||
className={ classNames( 'woocommerce-chart__type-button', {
|
||||
'woocommerce-chart__type-button-selected': query.type === 'line',
|
||||
'woocommerce-chart__type-button-selected': ! query.type || query.type === 'line',
|
||||
} ) }
|
||||
icon={ <Gridicon icon="line-graph" /> }
|
||||
title={ __( 'Line chart', 'wc-admin' ) }
|
||||
|
|
|
@ -33,18 +33,6 @@
|
|||
margin-left: $gap;
|
||||
margin-right: $gap;
|
||||
}
|
||||
|
||||
.woocommerce-chart__type-button {
|
||||
&.components-icon-button {
|
||||
color: $core-grey-light-700;
|
||||
&.woocommerce-chart__type-button-selected {
|
||||
color: $core-grey-dark-500;
|
||||
}
|
||||
&:hover {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.woocommerce-chart__body {
|
||||
|
@ -112,3 +100,16 @@
|
|||
.woocommerce-chart__types {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.woocommerce-chart__type-button {
|
||||
background: transparent !important;
|
||||
&.components-icon-button {
|
||||
color: $core-grey-light-700;
|
||||
&.woocommerce-chart__type-button-selected {
|
||||
color: $core-grey-dark-500;
|
||||
}
|
||||
&:hover {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue