diff --git a/src/components/alert-info/block.tsx b/src/components/alert-info/block.tsx index 60c5ed5f..04ac8988 100644 --- a/src/components/alert-info/block.tsx +++ b/src/components/alert-info/block.tsx @@ -12,6 +12,7 @@ interface AlertInfoProps { icon?: React.ReactNode; ellipsis?: boolean; style?: React.CSSProperties; + contentStyle?: React.CSSProperties; title: React.ReactNode; } @@ -30,7 +31,15 @@ const ContentWrapper = styled.div<{ $hasTitle: boolean }>` `; const AlertInfo: React.FC = (props) => { - const { message, type, rows = 1, ellipsis, style, title } = props; + const { + message, + type, + rows = 1, + ellipsis, + style, + title, + contentStyle + } = props; return ( <> @@ -51,7 +60,7 @@ const AlertInfo: React.FC = (props) => { {title && {title}} - + {message} diff --git a/src/components/modal-footer/index.tsx b/src/components/modal-footer/index.tsx index cac3dbcc..2e437378 100644 --- a/src/components/modal-footer/index.tsx +++ b/src/components/modal-footer/index.tsx @@ -1,5 +1,6 @@ import { useIntl } from '@umijs/max'; import { Button, Space } from 'antd'; +import React from 'react'; type ModalFooterProps = { onOk?: () => void; @@ -9,10 +10,12 @@ type ModalFooterProps = { htmlType?: 'button' | 'submit'; okBtnProps?: any; cancelBtnProps?: any; - align?: 'start' | 'end' | 'center' | 'baseline'; - form?: any; loading?: boolean; style?: React.CSSProperties; + showOkBtn?: boolean; + showCancelBtn?: boolean; + extra?: React.ReactNode; + form?: any; }; const ModalFooter: React.FC = ({ onOk, @@ -23,8 +26,9 @@ const ModalFooter: React.FC = ({ cancelBtnProps, loading, htmlType = 'button', - align = 'end', style, + showOkBtn = true, + extra, form }) => { const intl = useIntl(); @@ -33,16 +37,19 @@ const ModalFooter: React.FC = ({ - + {extra} + {showOkBtn && ( + + )} ); }; diff --git a/src/components/overlay-scroller/index.tsx b/src/components/overlay-scroller/index.tsx index 50eb52ff..adefaa1f 100644 --- a/src/components/overlay-scroller/index.tsx +++ b/src/components/overlay-scroller/index.tsx @@ -10,7 +10,12 @@ const Wrapper = styled.div<{ $maxHeight?: number }>` padding-inline: 10px; `; -const OverlayScroller: React.FC = ({ children, maxHeight, theme }) => { +const OverlayScroller: React.FC = ({ + children, + maxHeight, + theme, + style +}) => { const scroller = React.useRef(null); const { initialize } = useOverlayScroller({ options: { @@ -25,7 +30,15 @@ const OverlayScroller: React.FC = ({ children, maxHeight, theme }) => { }, []); return ( -