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

Make `EmojiProps` interface an extension of `HTMLSpanElement` #3

bdbaraban opened this issue Aug 24, 2019 · 1 comment


Copy link

@bdbaraban bdbaraban commented Aug 24, 2019

I believe the EmojiProps interface should extend the HTMLSpanElement type. That way, additional <span> attributes can be directly passed as props to the Emoji component without raising type errors in TypeScript.


interface EmojiProps extends React.HTMLAttributes<HTMLSpanElement> {
  label?: string;
  symbol: string;

Safely permits usage such as:

<Emoji label="dog" symbol="🐕" className="className" />

This comment has been minimized.

Copy link

@SeanMcP SeanMcP commented Sep 4, 2019

That's a great suggestion, @bdbaraban! Are you interested in making the pull request?

@SeanMcP SeanMcP added this to To do in v1.1 via automation Sep 4, 2019
@SeanMcP SeanMcP closed this in dc4cd0c Sep 5, 2019
v1.1 automation moved this from To do to Done Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.