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

Option to hide skin tone button #595

Closed
forresto opened this issue May 12, 2022 · 0 comments
Closed

Option to hide skin tone button #595

forresto opened this issue May 12, 2022 · 0 comments

Comments

@forresto
Copy link

forresto commented May 12, 2022

I'm working with an emoji set (Noto Emoji) that doesn't have skin tone variations. I'd like to not have the skin tones button.

#198 was a similar issue, fixed for a previous version.

Workaround

Because the picker uses shadow DOM, we can inject a style sheet with overrides like this:

        const pickerEl = document.querySelector("em-emoji-picker");
        const pickerStyleEl = document.createElement("style");
        pickerStyleEl.innerHTML = ".skin-tone-button { display: none; }";
        pickerEl.shadowRoot.appendChild(pickerStyleEl);

Demo of emoji-mart with Noto Emoji.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants