style: usage download button
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
import CardWrapper from '@/components/card-wrapper';
|
||||
import { SimpleCard } from '@/components/card-wrapper/simple-card';
|
||||
import MixLineBar from '@/components/echarts/mix-line-bar';
|
||||
import { ExportOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button } from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { baseColorMap } from '../../config';
|
||||
|
||||
const DownloadButton = styled(Button)`
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
`;
|
||||
|
||||
interface RequestTokenInnerProps {
|
||||
onExport?: () => void;
|
||||
requestData: {
|
||||
name: string;
|
||||
color: string;
|
||||
@@ -50,10 +62,19 @@ const legendData = [
|
||||
];
|
||||
|
||||
const RequestTokenInner: React.FC<RequestTokenInnerProps> = (props) => {
|
||||
const { requestData, tokenData, xAxisData } = props;
|
||||
const { requestData, tokenData, xAxisData, onExport } = props;
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<CardWrapper style={{ width: '100%' }}>
|
||||
<CardWrapper style={{ width: '100%', position: 'relative' }}>
|
||||
<DownloadButton
|
||||
type="text"
|
||||
icon={<ExportOutlined />}
|
||||
size="small"
|
||||
onClick={onExport}
|
||||
>
|
||||
{intl.formatMessage({ id: 'common.button.export' })}
|
||||
</DownloadButton>
|
||||
<SimpleCard dataList={dataList} height={80}></SimpleCard>
|
||||
<MixLineBar
|
||||
chartData={{
|
||||
|
||||
Reference in New Issue
Block a user