mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 01:00:14 -04:00
* Prettier all the JS files * Add GitHub Action to autoformat code pushed to master * Fix eslint violation due to formatting. * Remove GitHub actions for styling * Add restyled.io config
34 lines
652 B
JavaScript
34 lines
652 B
JavaScript
import React from "react";
|
|
import PropTypes from "prop-types";
|
|
import { react2angular } from "react2angular";
|
|
|
|
export function SortIcon({ column, sortColumn, reverse }) {
|
|
if (column !== sortColumn) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<span>
|
|
<i className={"fa fa-sort-" + (reverse ? "desc" : "asc")} />
|
|
</span>
|
|
);
|
|
}
|
|
|
|
SortIcon.propTypes = {
|
|
column: PropTypes.string,
|
|
sortColumn: PropTypes.string,
|
|
reverse: PropTypes.bool,
|
|
};
|
|
|
|
SortIcon.defaultProps = {
|
|
column: null,
|
|
sortColumn: null,
|
|
reverse: false,
|
|
};
|
|
|
|
export default function init(ngModule) {
|
|
ngModule.component("sortIcon", react2angular(SortIcon));
|
|
}
|
|
|
|
init.init = true;
|