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

chore: Feat + Fix: added searchbar + emoji name and fixed emoji picker position #930

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions packages/react/src/views/EmojiPicker/EmojiPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ const CustomEmojiPicker = ({
}) => {
const theme = useTheme();
const styles = getEmojiPickerStyles(theme);

const previewConfig = {
defaultEmoji: '1f60d',
defaultCaption: 'None',
showPreview: false,
showPreview: true,
};

return (
Expand All @@ -32,13 +31,13 @@ const CustomEmojiPicker = ({
height="auto"
width="auto"
>
<Box css={styles.inputBox}>
<Box css={styles.emojiPicker}>
<EmojiPicker
height={350}
width={300}
height={400}
width={350}
onEmojiClick={handleEmojiClick}
previewConfig={previewConfig}
searchDisabled
searchDisabled={false}
emojiStyle="facebook"
lazyLoadEmojis
/>
Expand Down
10 changes: 4 additions & 6 deletions packages/react/src/views/EmojiPicker/EmojiPicker.styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getEmojiPickerStyles = ({ theme, mode }) => {
--epr-picker-border-color: ${theme.colors.border};
--epr-category-label-bg-color: ${theme.colors.background};
--epr-category-icon-active-color: ${theme.colors.secondary};
--epr-emoji-size: 20px;
--epr-emoji-size: 25px;
--epr-category-navigation-button-size: 20px;
--epr-emoji-gap: 10px;

Expand All @@ -38,7 +38,7 @@ const getEmojiPickerStyles = ({ theme, mode }) => {
--epr-search-bar-inner-padding: var(--epr-horizontal-padding);
--epr-emoji-variation-picker-height: 45px;
--epr-emoji-variation-picker-bg-color: var(--epr-bg-color);
--epr-preview-height: 70px;
--epr-preview-height: 65px;
--epr-preview-text-size: 14px;
--epr-preview-text-padding: 0 var(--epr-horizontal-padding);
--epr-preview-border-color: var(--epr-picker-border-color);
Expand All @@ -49,9 +49,7 @@ const getEmojiPickerStyles = ({ theme, mode }) => {
--epr-category-label-height: 40px;

--epr-emoji-padding: 5px;
--epr-emoji-fullsize: calc(
var(--epr-emoji-size) + var(--epr-emoji-padding) * 2
);

--epr-emoji-hover-color: var(--epr-hover-bg-color);
--epr-emoji-variation-indicator-color: var(--epr-picker-border-color);
--epr-emoji-variation-indicator-color-hover: var(--epr-text-color);
Expand All @@ -60,11 +58,11 @@ const getEmojiPickerStyles = ({ theme, mode }) => {
--epr-category-label-z-index: 2;
--epr-skin-variation-picker-z-index: 5;
--epr-preview-z-index: 6;
--epr-search-input-bg-color: ${calculatedColors};

/* Use these properties of color if needed ->

--epr-shadow: 'theme-color';
--epr-search-input-bg-color: 'theme-color';
--epr-skin-tone-picker-menu-color: 'theme-color';
--epr-dark: 'theme-color'
--epr-dark-emoji-variation-picker-bg-color: var(--epr-dark);
Expand Down
Loading