Skip to content

Instantly share code, notes, and snippets.

@Keraito
Last active June 7, 2022 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Keraito/587813211508390227aa45985d624fbb to your computer and use it in GitHub Desktop.
Save Keraito/587813211508390227aa45985d624fbb to your computer and use it in GitHub Desktop.
import { ComponentProps } from "react";
import { ExternalComponent } from "external-lib";
type InternalComponentProps = ComponentProps<typeof ExternalComponent> & {
outerClassName: string;
};
const InternalComponent = ({
outerClassName,
...restProps
}: InternalComponentProps) => (
<div className={outerClassName}>
<ExternalComponent {...restProps} />
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment