feat: add disable style for confirm button

pull/103/head
crazywoola 3 years ago
parent 527328060a
commit bf323dc1be

@ -104,7 +104,7 @@ const EmojiPicker: FC<IEmojiPickerProps> = ({
</div> </div>
{/* Color Select */} {/* Color Select */}
<div className='flex flex-col p-3'> <div className={cn('flex flex-col p-3 ', selectedEmoji == '' ? 'opacity-25' : '')}>
<p className='font-medium uppercase text-xs text-[#101828] mb-2'>Choose Style</p> <p className='font-medium uppercase text-xs text-[#101828] mb-2'>Choose Style</p>
<div className='w-full h-full grid grid-cols-8 gap-1'> <div className='w-full h-full grid grid-cols-8 gap-1'>
{backgroundColors.map((color) => { {backgroundColors.map((color) => {
@ -138,9 +138,13 @@ const EmojiPicker: FC<IEmojiPickerProps> = ({
}}> }}>
Cancel Cancel
</Button> </Button>
<Button type="primary" className='w-full' onClick={() => { <Button
onSelect && onSelect(selectedEmoji, selectedBackground) disabled={selectedEmoji == ''}
}}> type="primary"
className='w-full'
onClick={() => {
onSelect && onSelect(selectedEmoji, selectedBackground)
}}>
OK OK
</Button> </Button>
</div> </div>

Loading…
Cancel
Save