Skip to content

Instantly share code, notes, and snippets.

@sunnyone
Last active May 11, 2021 13:13
Show Gist options
  • Save sunnyone/7e33709eec5eb3d1f88fc8d227a6afe7 to your computer and use it in GitHub Desktop.
Save sunnyone/7e33709eec5eb3d1f88fc8d227a6afe7 to your computer and use it in GitHub Desktop.
interface HogeListItemProps {
title: string;
}
const HogeListItem: React.VFC<HogeListItemProps> = ({title}) =>
<li>{title}</li>;
interface HogeListProps {
children: ReactNode;
}
export const HogeList: React.VFC<HogeListProps> & {Item: typeof HogeListItem} = ({children}) =>
<ul>{children}</ul>;
HogeList.Item = HogeListItem;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment