2022-05-05 11:08:45 -07:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import IconPickerDropdown from './icon_picker_dropdown';
|
|
|
|
|
|
|
|
interface IIconPicker {
|
2022-05-05 13:54:06 -07:00
|
|
|
label?: React.ReactNode,
|
2022-05-05 11:08:45 -07:00
|
|
|
value: string,
|
|
|
|
onChange: React.ChangeEventHandler,
|
|
|
|
}
|
|
|
|
|
|
|
|
const IconPicker: React.FC<IIconPicker> = ({ onChange, value, label }) => {
|
|
|
|
return (
|
|
|
|
<div className='input with_label font_icon_picker'>
|
|
|
|
<div className='label_input__font_icon_picker'>
|
|
|
|
{label && (<label>{label}</label>)}
|
|
|
|
<div className='label_input_wrapper'>
|
|
|
|
<IconPickerDropdown value={value} onPickEmoji={onChange} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default IconPicker;
|