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/0750ae0b7b6d4651ebaf054a20d105e9 to your computer and use it in GitHub Desktop.
Save Keraito/0750ae0b7b6d4651ebaf054a20d105e9 to your computer and use it in GitHub Desktop.
import { PropsWithChildren } from "react";
import { SomeOtherComponent, SomeOtherComponentProps } from "./someOtherComponent";
type ComponentProps = Omit<Something, "propC" | "propD"> & {
wrapperClassName?: string;
}
export const Component = (props: ComponentProps) => (
<div className={props.wrapperClassName}>
<SomeOtherComponent propA={props.propA} propB={props.propB}>
{props.children}
</SomeOtherComponent>
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment