fix: style of suggestion item
This commit is contained in:
parent
24f23b3573
commit
f85162622d
@ -9,7 +9,7 @@ export default function (props: { children: React.ReactNode; query: string; sele
|
||||
if (props.selected) {
|
||||
return (
|
||||
<div
|
||||
className={`w-full h-10 leading-10 bg-zinc-300 dark:bg-zinc-700
|
||||
className={`relative w-full h-10 leading-10 bg-zinc-300 dark:bg-zinc-700
|
||||
px-5 z-10 cursor-pointer duration-100 truncate`}
|
||||
onClick={() => {
|
||||
search(props.query, engine, newTab);
|
||||
@ -22,7 +22,7 @@ export default function (props: { children: React.ReactNode; query: string; sele
|
||||
else {
|
||||
return (
|
||||
<div
|
||||
className={`w-full h-10 leading-10 bg-zinc-100 hover:bg-zinc-300
|
||||
className={`relative w-full h-10 leading-10 bg-zinc-100 hover:bg-zinc-300
|
||||
dark:bg-zinc-800 hover:dark:bg-zinc-700 px-5 z-10 cursor-pointer duration-100 truncate`}
|
||||
onClick={() => {
|
||||
search(props.query, engine, newTab);
|
||||
|
@ -2,7 +2,7 @@ export default function (props: { children: React.ReactNode; selected: boolean }
|
||||
if (props.selected) {
|
||||
return (
|
||||
<div
|
||||
className={`block w-full h-auto leading-6 break-all py-[0.6rem] bg-zinc-300 dark:bg-zinc-700
|
||||
className={`relative w-full h-auto leading-6 break-all py-[0.6rem] bg-zinc-300 dark:bg-zinc-700
|
||||
px-5 z-10 cursor-pointer duration-100`}
|
||||
>
|
||||
{props.children}
|
||||
@ -11,7 +11,7 @@ export default function (props: { children: React.ReactNode; selected: boolean }
|
||||
} else {
|
||||
return (
|
||||
<div
|
||||
className={`block w-full h-auto leading-6 break-all py-[0.6rem] bg-zinc-100 hover:bg-zinc-300
|
||||
className={`relative w-full h-auto leading-6 break-all py-[0.6rem] bg-zinc-100 hover:bg-zinc-300
|
||||
dark:bg-zinc-800 hover:dark:bg-zinc-700 px-5 z-10 cursor-pointer duration-100`}
|
||||
>
|
||||
{props.children}
|
||||
|
@ -1,6 +1,6 @@
|
||||
export default function(props: { children: React.ReactNode }) {
|
||||
return (
|
||||
<div dangerouslySetInnerHTML={{ __html: `<p>${props.children}</p>` as string }} className={`w-full h-10 leading-10 bg-zinc-100 hover:bg-zinc-300 dark:bg-zinc-800 hover:dark:bg-zinc-700 px-5 z-10 cursor-pointer duration-100`}>
|
||||
<div dangerouslySetInnerHTML={{ __html: `<p>${props.children}</p>` as string }} className={`relative w-full h-10 leading-10 bg-zinc-100 hover:bg-zinc-300 dark:bg-zinc-800 hover:dark:bg-zinc-700 px-5 z-10 cursor-pointer duration-100`}>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
export default function(props: { children?: React.ReactNode }) {
|
||||
return (
|
||||
<div className={`relative bg-zinc-100 dark:bg-zinc-800 w-11/12 sm:w-[700px] h-auto left-1/2
|
||||
translate-x-[-50%] top-72 z-20 rounded-md overflow-hidden duration-250 ${props.children ? "opacity-100" : "opacity-0"}`}>
|
||||
<div className={`relative bg-zinc-100 dark:bg-zinc-800 w-11/12 sm:w-[700px] h-auto max-h-[calc(100vh-20rem)]
|
||||
overflow-y-auto left-1/2 translate-x-[-50%] top-72 z-20 rounded-md overflow-hidden duration-250
|
||||
${props.children ? "opacity-100" : "opacity-0"}`}>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
|
7397
pnpm-lock.yaml
7397
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user