forked from sombochea/verdaccio-ui
fix: introduced forwardRef (#185)
This commit is contained in:
committed by
Juan Picado @jotadeveloper
parent
af8ed8b3e3
commit
7548c89401
10
src/muiComponents/Dialog/Dialog.tsx
Normal file
10
src/muiComponents/Dialog/Dialog.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
import { default as MaterialUIDialog, DialogProps } from '@material-ui/core/Dialog';
|
||||
|
||||
type DialogRef = HTMLDivElement;
|
||||
|
||||
const Dialog = forwardRef<DialogRef, DialogProps>(function Dialog(props, ref) {
|
||||
return <MaterialUIDialog {...props} ref={ref} />;
|
||||
});
|
||||
|
||||
export default Dialog;
|
||||
1
src/muiComponents/Dialog/index.ts
Normal file
1
src/muiComponents/Dialog/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from './Dialog';
|
||||
10
src/muiComponents/DialogActions/DialogActions.tsx
Normal file
10
src/muiComponents/DialogActions/DialogActions.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
import { default as MaterialUIDialogActions, DialogActionsProps } from '@material-ui/core/DialogActions';
|
||||
|
||||
type DialogActionsRef = HTMLDivElement;
|
||||
|
||||
const DialogActions = forwardRef<DialogActionsRef, DialogActionsProps>(function DialogActions(props, ref) {
|
||||
return <MaterialUIDialogActions {...props} ref={ref} />;
|
||||
});
|
||||
|
||||
export default DialogActions;
|
||||
1
src/muiComponents/DialogActions/index.ts
Normal file
1
src/muiComponents/DialogActions/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from './DialogActions';
|
||||
10
src/muiComponents/DialogContent/DialogContent.tsx
Normal file
10
src/muiComponents/DialogContent/DialogContent.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
import { default as MaterialUIDialogContent, DialogContentProps } from '@material-ui/core/DialogContent';
|
||||
|
||||
type DialogContentRef = HTMLDivElement;
|
||||
|
||||
const DialogContent = forwardRef<DialogContentRef, DialogContentProps>(function DialogContent(props, ref) {
|
||||
return <MaterialUIDialogContent {...props} ref={ref} />;
|
||||
});
|
||||
|
||||
export default DialogContent;
|
||||
1
src/muiComponents/DialogContent/index.ts
Normal file
1
src/muiComponents/DialogContent/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from './DialogContent';
|
||||
10
src/muiComponents/DialogTitle/DialogTitle.tsx
Normal file
10
src/muiComponents/DialogTitle/DialogTitle.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
import { default as MaterialUIDialogTitle, DialogTitleProps } from '@material-ui/core/DialogTitle';
|
||||
|
||||
type DialogTitleRef = HTMLDivElement;
|
||||
|
||||
const DialogTitle = forwardRef<DialogTitleRef, DialogTitleProps>(function DialogTitle(props, ref) {
|
||||
return <MaterialUIDialogTitle {...props} ref={ref} />;
|
||||
});
|
||||
|
||||
export default DialogTitle;
|
||||
1
src/muiComponents/DialogTitle/index.ts
Normal file
1
src/muiComponents/DialogTitle/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from './DialogTitle';
|
||||
Reference in New Issue
Block a user