ValidationActionBar.tsx
1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { ArrowLeftOutlined, ArrowRightOutlined } from '@ant-design/icons';
import { UButton } from '@uj/ui';
export interface ValidationActionBarProps {
/** 下一步(数据确认)按钮是否禁用(有失败行时禁用,先下载失败明细修模板) */
nextDisabled?: boolean;
onBack?: () => void;
onNextStep?: () => void;
}
export function ValidationActionBar({
nextDisabled = false,
onBack,
onNextStep,
}: ValidationActionBarProps) {
return (
<div
style={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
paddingTop: 8,
}}
>
<UButton icon={<ArrowLeftOutlined />} onClick={onBack ?? (() => console.log('返回上一步'))}>
返回上一步
</UButton>
<UButton
type="primary"
icon={<ArrowRightOutlined />}
disabled={nextDisabled}
onClick={onNextStep ?? (() => console.log('下一步:数据确认'))}
>
下一步:数据确认
</UButton>
</div>
);
}