import React, { FC } from 'react'; import classnames from 'classnames'; import styles from './index.less'; interface PageProps { onRightClick?: () => void; onLeftClick?: () => void; styleClassName?: string; rightBtLabel?: string; leftBtLabel?: string; children?: React.ReactNode; isShowInterval?: boolean; leftBtStyle?: string; rightBtStyle?: string; } /** * 底部按钮组件 */ const FooterButton: FC = (props) => { const { onRightClick, onLeftClick, styleClassName, rightBtLabel, leftBtLabel, children, isShowInterval = true, leftBtStyle, rightBtStyle, } = props; return (
{children} {leftBtLabel && !!!children && (
onLeftClick && onLeftClick()} > {leftBtLabel}
)} {leftBtLabel && rightBtLabel && !!!children && isShowInterval && (
)} {rightBtLabel && !!!children && (
onRightClick && onRightClick()} > {rightBtLabel}
)}
); }; export default FooterButton;