From 9611079d4d27fdce5dabfe9efce713490442213d Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Sun, 12 Nov 2017 20:14:26 +0800 Subject: [PATCH] Table: sort arrow nostalgia --- packages/table/src/table-header.js | 10 ++++------ packages/theme-chalk/src/table.scss | 23 ++++++++++++++++------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/packages/table/src/table-header.js b/packages/table/src/table-header.js index 84955c0be..6a745bce5 100644 --- a/packages/table/src/table-header.js +++ b/packages/table/src/table-header.js @@ -119,12 +119,10 @@ export default { { column.sortable ? this.handleSortClick($event, column) }> - this.handleSortClick($event, column, 'ascending') }> - - - this.handleSortClick($event, column, 'descending') }> - - + this.handleSortClick($event, column, 'ascending') }> + + this.handleSortClick($event, column, 'descending') }> + : '' } diff --git a/packages/theme-chalk/src/table.scss b/packages/theme-chalk/src/table.scss index eeb5cbca8..b61b451ee 100644 --- a/packages/theme-chalk/src/table.scss +++ b/packages/theme-chalk/src/table.scss @@ -426,20 +426,29 @@ } .caret-wrapper { - position: relative; - display: inline-flex; - align-items: center; - height: 13px; - width: 24px; + position: absolute; + display: inline-block; + height: 100%; + vertical-align: middle; cursor: pointer; overflow: initial; } .sort-caret { - color: $--icon-color-base; + color: $--color-text-placeholder; width: 14px; overflow: hidden; - font-size: 13px; + font-size: 15px; + position: absolute; + left: 4px; + + &.ascending { + top: 1px; + } + + &.descending { + bottom: 1px; + } } .ascending .sort-caret.ascending {