mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
minor reorder
This commit is contained in:
parent
98c7eb206f
commit
9e3b15c7e3
1 changed files with 9 additions and 9 deletions
|
|
@ -75,15 +75,6 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
|
|||
</p>;
|
||||
}
|
||||
|
||||
//https://stackoverflow.com/a/11868398/2343739
|
||||
private static getContrast(hexcolor: string) {
|
||||
const r = parseInt(hexcolor.substr(0, 2), 16);
|
||||
const g = parseInt(hexcolor.substr(2, 2), 16);
|
||||
const b = parseInt(hexcolor.substr(4, 2), 16);
|
||||
const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
|
||||
return (yiq >= 128) ? "black" : "white";
|
||||
}
|
||||
|
||||
private static renderFilterListsTable(state: IHomeState) {
|
||||
return <ReactTable
|
||||
data={state.lists}
|
||||
|
|
@ -185,6 +176,15 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
|
|||
}}
|
||||
className="-striped -highlight"/>;
|
||||
}
|
||||
|
||||
//https://stackoverflow.com/a/11868398/2343739
|
||||
private static getContrast(hexcolor: string) {
|
||||
const r = parseInt(hexcolor.substr(0, 2), 16);
|
||||
const g = parseInt(hexcolor.substr(2, 2), 16);
|
||||
const b = parseInt(hexcolor.substr(4, 2), 16);
|
||||
const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
|
||||
return (yiq >= 128) ? "black" : "white";
|
||||
}
|
||||
}
|
||||
|
||||
interface IListDto {
|
||||
|
|
|
|||
Loading…
Reference in a new issue