Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export props types #3879

Open
psperber opened this issue Feb 28, 2025 · 0 comments
Open

Export props types #3879

psperber opened this issue Feb 28, 2025 · 0 comments
Labels
❓question Further information is requested

Comments

@psperber
Copy link

I would like to create an extended variant of some of your components. It should accept all properties of the original component as well as the new ones. Below is an example of how I imported the prop type as a workaround.

import { DBInput } from "@db-ux/react-core-components";
import type { DBInputProps } from "@db-ux/react-core-components/dist/components/input/model";

type ExtendedInputProps = DBInputProps & {
    dummyValue: string;
}

export const ExtendedInput = ({ dummyValue, ...props }: ExtendedInputProps) => {
    // value does not make sense, just for demo purposes
    return <DBInput {...props} value={dummyValue} />;
}
@mfranzke mfranzke added the ❓question Further information is requested label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants