design-system-simplefi
Version:
Design System for SimpleFi Applications
15 lines • 867 B
JavaScript
import React from 'react';
import { IconButton } from '../IconButton';
var getSvg = function (direction, onClick) {
if (direction === 'DESC')
return (React.createElement(IconButton, { color: "lightPurple", iconName: "sort-up", iconType: "sfi", label: "ascending", onClick: onClick }));
if (direction === 'ASC')
return (React.createElement(IconButton, { color: "lightPurple", iconName: "sort-down", iconType: "sfi", label: "descending", onClick: onClick }));
return (React.createElement(IconButton, { color: "lightGrey", iconName: "sort", iconType: "sfi", label: "no-sort", onClick: onClick }));
};
var SortButton = function (_a) {
var onClick = _a.onClick, direction = _a.direction;
return (React.createElement(React.Fragment, null, getSvg(direction, onClick)));
};
export default SortButton;
//# sourceMappingURL=SortButton.js.map