Skip to content

Commit

Permalink
feat(Icon): update icons
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxuoz committed Mar 15, 2019
1 parent 6ec7d98 commit 1aec8a1
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 26 deletions.
Binary file not shown.
1 change: 0 additions & 1 deletion e2e/__tests__/icon.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { baisy } from '../setup/TestSuiter';


const SUITES = [
baisy.suite('Components/Icon', 'all icons'),
baisy.suite('Components/Icon', 'with color'),
baisy.suite('Components/Icon', 'with size'),
];
Expand Down
4 changes: 2 additions & 2 deletions src/components/Icon/glyphs/ChevronDown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/Icon/glyphs/ChevronLeft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/Icon/glyphs/ChevronRight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/Icon/glyphs/ChevronTop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions src/components/Icon/glyphs/Dots.svg

This file was deleted.

3 changes: 3 additions & 0 deletions src/components/Icon/glyphs/More.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/Icon/glyphs/MoreVertical.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions src/components/Icon/glyphs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import Alert from './Alert.svg';
import APIToken from './APIToken.svg';
import Check from './Check.svg';
import ChevronDown from './ChevronDown.svg';
import ChevronLeft from './ChevronLeft.svg';
import ChevronRight from './ChevronRight.svg';
import ChevronTop from './ChevronTop.svg';
import CloudDatabase from './Cloud-Database.svg';
import Contract from './Contract.svg';
import Customers from './Customers.svg';
Expand All @@ -13,7 +16,6 @@ import Delete from './Delete.svg';
import Diagram from './Diagram.svg';
import Discord from './Discord.svg';
import DismissData from './Dismiss-Data.svg';
import Dots from './Dots.svg';
import EditPencil from './EditPencil.svg';
import EightBase from './EightBase.svg';
import Environment from './Environment.svg';
Expand All @@ -28,6 +30,8 @@ import Lock from './Lock.svg';
import Logic from './Logic.svg';
import Mail from './Mail.svg';
import MapPin from './MapPin.svg';
import More from './More.svg';
import MoreVertical from './MoreVertical.svg';
import PaperClip from './PaperClip.svg';
import Planet from './Planet.svg';
import Schema from './Schema.svg';
Expand All @@ -45,6 +49,9 @@ export {
APIToken,
Check,
ChevronDown,
ChevronLeft,
ChevronRight,
ChevronTop,
CloudDatabase,
Contract,
Customers,
Expand All @@ -53,7 +60,6 @@ export {
Diagram,
Discord,
DismissData,
Dots,
EditPencil,
EightBase,
Environment,
Expand All @@ -68,6 +74,8 @@ export {
Logic,
Mail,
MapPin,
More,
MoreVertical,
PaperClip,
Planet,
Schema,
Expand Down
16 changes: 1 addition & 15 deletions src/components/Table/TableHeaderCell.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @flow
import React, { PureComponent } from 'react';
import styled from 'react-emotion';

import { createThemeTag } from '../../theme/createThemeTag';

Expand Down Expand Up @@ -33,17 +32,6 @@ const [TableHeaderCellTag, theme] = createThemeTag(name, ({ SIZES }: *) => ({
}),
}));


const IconTransform = styled('div')(props => {
const styles = {};

if (props.order === 'ASC') {
styles.transform = 'rotate(180deg)';
}

return styles;
});

class TableHeaderCell extends PureComponent<TableHeaderCellProps> {

onSort = () => {
Expand All @@ -65,9 +53,7 @@ class TableHeaderCell extends PureComponent<TableHeaderCellProps> {
<TableHeaderCellTag { ...rest } onClick={ this.onSort } tagName={ Row }>
<span>{ children }</span>
<If condition={ !!rest.order }>
<IconTransform modifiers={ rest }>
<Icon name="ChevronDown" size="md" />
</IconTransform>
<Icon name={ rest.order === 'ASC' ? 'ChevronTop' : 'ChevronDown' } size="xs" />
</If>
</TableHeaderCellTag>
);
Expand Down

0 comments on commit 1aec8a1

Please sign in to comment.