diff --git a/src/components/General/BreadcrumbBar/BreadcrumbBar.css b/src/components/General/BreadcrumbBar/BreadcrumbBar.css index 5730f82e..0df51597 100644 --- a/src/components/General/BreadcrumbBar/BreadcrumbBar.css +++ b/src/components/General/BreadcrumbBar/BreadcrumbBar.css @@ -4,6 +4,9 @@ padding: 1rem 2rem; margin: 0.5rem; } +.breadcrumb-bar-ul { + display: flex; +} .breadcrumb-bar-li { color: #647084; font-weight: 500; diff --git a/src/components/General/CreateAvatar/CreateAvatar.tsx b/src/components/General/CreateAvatar/CreateAvatar.tsx index 29adff6e..0d5fba4c 100644 --- a/src/components/General/CreateAvatar/CreateAvatar.tsx +++ b/src/components/General/CreateAvatar/CreateAvatar.tsx @@ -6,10 +6,15 @@ import './CreateAvatar.css' import LabelInputField from '../LabelInputField' import ColorPicker from '../ColorPicker/ColorPicker' import EmojiPickerDialog from '../EmojiPickerDialog' +import { Emoji, EmojiClickData } from 'emoji-picker-react' const CreateAvatar = () => { const [chosenColor, setChosenColor] = useState('#2A4AF5') const [isEmojiDialogOpen, setIsEmojiDialogOpen] = useState(false) + const [selectedEmoji, setSelectedEmoji] = useState('1f600') + function changeEmoji(emojiData: EmojiClickData) { + setSelectedEmoji(emojiData.unified) + } return ( @@ -22,7 +27,7 @@ const CreateAvatar = () => {
- + {selectedEmoji ? : null}
{ /> } /> - {isEmojiDialogOpen && } + {isEmojiDialogOpen && ( + + )}
diff --git a/src/components/General/EmojiPickerDialog.tsx b/src/components/General/EmojiPickerDialog.tsx index f16f7895..e1f39649 100644 --- a/src/components/General/EmojiPickerDialog.tsx +++ b/src/components/General/EmojiPickerDialog.tsx @@ -5,33 +5,24 @@ import EmojiPicker, { SuggestionMode, Categories, } from 'emoji-picker-react' -import { useState } from 'react' import { Stack } from 'tamagui' type EmojiStyleType = 'FACEBOOK' | 'APPLE' | 'GOOGLE' | 'TWITTER' | 'NATIVE' -function EmojiPickerDialog({ emojiStyle }: { emojiStyle: EmojiStyleType }) { - const [selectedEmoji, setSelectedEmoji] = useState('') - console.log(selectedEmoji) - function onClick(emojiData: EmojiClickData) { - setSelectedEmoji(emojiData.unified) - } +type EmojiPickerProps = { + emojiStyle: EmojiStyleType + changeEmoji: (emojiData: EmojiClickData) => void +} +function EmojiPickerDialog({ emojiStyle, changeEmoji }: EmojiPickerProps) { return ( - - {/* - Your selected Emoji is: - {selectedEmoji ? ( - - ) : null} - */} - +