Skip to content

Commit c4eccd5

Browse files
committed
feat: 增加extra
1 parent f260866 commit c4eccd5

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/Dialog/Content/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ const Content = React.forwardRef<ContentRef, ContentProps>((props, ref) => {
3838
const panelRef = useRef<PanelRef>(null);
3939

4040
const hasExtra =
41-
extra !== null &&
42-
extra !== undefined &&
43-
typeof extra !== 'boolean' &&
44-
!(typeof extra === 'string' && extra.trim() === '');
41+
extra !== null &&
42+
extra !== undefined &&
43+
typeof extra !== 'boolean' &&
44+
!(typeof extra === 'string' && extra.trim() === '');
4545

4646
// ============================== Refs ==============================
4747
React.useImperativeHandle(ref, () => ({

src/Dialog/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ const Dialog: React.FC<IDialogPropTypes> = (props) => {
5656
}
5757
}
5858

59-
const hasExtra =
60-
extra !== null &&
61-
extra !== undefined &&
62-
typeof extra !== 'boolean' &&
63-
!(typeof extra === 'string' && extra.trim() === '');
64-
6559
const lastOutSideActiveElementRef = useRef<HTMLElement>(null);
6660
const wrapperRef = useRef<HTMLDivElement>(null);
6761
const contentRef = useRef<ContentRef>(null);

0 commit comments

Comments
 (0)