feat: highlight emoji completion

This commit is contained in:
Shusui MOYATANI
2023-07-03 01:30:56 +09:00
parent 4da8ae5571
commit 1480ea9679

View File

@@ -26,7 +26,7 @@ const useEmojiComplete = () => {
}, },
template: (config: CustomEmojiConfig) => { template: (config: CustomEmojiConfig) => {
const e = ( const e = (
<div class="flex gap-1 pb-1"> <div class="flex gap-1 border-b px-2 py-1">
<img class="h-6 max-w-[3rem]" src={config.url} alt={config.shortcode} /> <img class="h-6 max-w-[3rem]" src={config.url} alt={config.shortcode} />
<div>{config.shortcode}</div> <div>{config.shortcode}</div>
</div> </div>
@@ -38,7 +38,11 @@ const useEmojiComplete = () => {
], ],
{ {
dropdown: { dropdown: {
className: 'px-2 pt-2 pb-1 bg-white shadow rounded', className: 'bg-white shadow rounded',
item: {
className: 'cursor-pointer',
activeClassName: 'bg-rose-100 cursor-pointer',
},
}, },
}, },
); );