revamp template
This commit is contained in:
21
src/components/modal/ModalBody.tsx
Normal file
21
src/components/modal/ModalBody.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import { forwardRef, ReactNode, CSSProperties } from 'react';
|
||||
|
||||
interface IModalBodyProps {
|
||||
className?: string;
|
||||
children: ReactNode;
|
||||
tabIndex?: number;
|
||||
style?: CSSProperties; // Accept inline styles as a prop
|
||||
}
|
||||
|
||||
// Forwarding ref to ensure this component can hold a ref
|
||||
const ModalBody = forwardRef<HTMLDivElement, IModalBodyProps>(
|
||||
({ className, children, style, tabIndex = -1 }, ref) => {
|
||||
return (
|
||||
<div ref={ref} tabIndex={tabIndex} className={`modal-body ${className}`} style={style}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
export { ModalBody };
|
||||
Reference in New Issue
Block a user