tianji/src/client/components/UpDownCounter.tsx

23 lines
585 B
TypeScript
Raw Normal View History

2023-10-03 12:57:24 +00:00
import { CaretDownOutlined, CaretUpOutlined } from '@ant-design/icons';
import React from 'react';
interface Props {
up: string;
down: string;
}
export const UpDownCounter: React.FC<Props> = React.memo((props) => {
return (
<div>
<div>
<CaretUpOutlined className="text-orange-500" />
2024-01-03 16:34:50 +00:00
<span className="ml-1 text-xs">{props.up}</span>
2023-10-03 12:57:24 +00:00
</div>
<div>
<CaretDownOutlined className="text-green-500" />
2024-01-03 16:34:50 +00:00
<span className="ml-1 text-xs">{props.down}</span>
2023-10-03 12:57:24 +00:00
</div>
</div>
);
});
UpDownCounter.displayName = 'UpDownCounter';