cloud_bbb/ts/Manager/SortArrow.tsx

17 lines
378 B
TypeScript
Raw Normal View History

2020-04-26 11:36:41 +02:00
import * as React from 'react';
export interface SortArrowProps {
name: string;
value: string;
direction: number;
}
export function SortArrow({name, value, direction}: SortArrowProps) {
if (name === value) {
return (<span className='sort_arrow'>
{direction < 0 ? '▼' : '▲'}
</span>);
} else {
return <span/>;
}
}