Open miloscript opened 1 month ago
Hi everybody.
I'm currently trying to write a wrapper around one of the IX components like this:
import { IxModalHeader } from '@siemens/ix-react'; interface ModalHeaderProps extends React.HTMLAttributes<HTMLIxModalHeaderElement> { children: React.ReactNode; } export const ModalHeader = ({ children }: ModalHeaderProps) => { return ( <IxModalHeader> <h2>{children}</h2> </IxModalHeader> ); };
The issue with this approach is that when I use my wrapped component, I'm not being able to pass props from the IXModaHeader like hideClose or icon.
hideClose
icon
Although I can write these out manually, I was wondering can it be done by importing the props directly, something like this:
interface ModalHeaderProps extends IXModalHeaderProps { children: React.ReactNode; }
Is this a functionality you guys find useful? Maybe I am missing something and this is actually possible?
Prerequisites
Suggestion / feature request
Hi everybody.
I'm currently trying to write a wrapper around one of the IX components like this:
The issue with this approach is that when I use my wrapped component, I'm not being able to pass props from the IXModaHeader like
hideClose
oricon
.Although I can write these out manually, I was wondering can it be done by importing the props directly, something like this:
Is this a functionality you guys find useful? Maybe I am missing something and this is actually possible?