chore: fix super auto-embed menu style
This commit is contained in:
@@ -24,6 +24,7 @@ import Button from '../../Lexical/UI/Button'
|
|||||||
import { DialogActions } from '../../Lexical/UI/Dialog'
|
import { DialogActions } from '../../Lexical/UI/Dialog'
|
||||||
import { INSERT_TWEET_COMMAND } from '../TwitterPlugin'
|
import { INSERT_TWEET_COMMAND } from '../TwitterPlugin'
|
||||||
import { INSERT_YOUTUBE_COMMAND } from '../YouTubePlugin'
|
import { INSERT_YOUTUBE_COMMAND } from '../YouTubePlugin'
|
||||||
|
import { classNames } from '@standardnotes/snjs'
|
||||||
|
|
||||||
interface PlaygroundEmbedConfig extends EmbedConfig {
|
interface PlaygroundEmbedConfig extends EmbedConfig {
|
||||||
// Human readable name of the embeded content e.g. Tweet or Google Map.
|
// Human readable name of the embeded content e.g. Tweet or Google Map.
|
||||||
@@ -127,15 +128,11 @@ function AutoEmbedMenuItem({
|
|||||||
onMouseEnter: () => void
|
onMouseEnter: () => void
|
||||||
option: AutoEmbedOption
|
option: AutoEmbedOption
|
||||||
}) {
|
}) {
|
||||||
let className = 'item'
|
|
||||||
if (isSelected) {
|
|
||||||
className += ' selected'
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
key={option.key}
|
key={option.key}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
className={className}
|
className={classNames('cursor-pointer rounded px-2 py-1', isSelected && 'bg-info-backdrop')}
|
||||||
ref={option.setRefElement}
|
ref={option.setRefElement}
|
||||||
role="option"
|
role="option"
|
||||||
aria-selected={isSelected}
|
aria-selected={isSelected}
|
||||||
@@ -160,8 +157,8 @@ function AutoEmbedMenu({
|
|||||||
options: Array<AutoEmbedOption>
|
options: Array<AutoEmbedOption>
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className="typeahead-popover">
|
<div className="typeahead-popover min-w-max rounded border border-border bg-default p-1">
|
||||||
<ul>
|
<ul className="list-none">
|
||||||
{options.map((option: AutoEmbedOption, i: number) => (
|
{options.map((option: AutoEmbedOption, i: number) => (
|
||||||
<AutoEmbedMenuItem
|
<AutoEmbedMenuItem
|
||||||
index={i}
|
index={i}
|
||||||
|
|||||||
Reference in New Issue
Block a user