fix: scroll

This commit is contained in:
nafees nazik
2023-09-20 17:05:57 +05:30
committed by Akhil Mohan
parent 63e8ecce5b
commit f84235eea3
@@ -66,10 +66,12 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
};
return (
<div className="relative">
<pre aria-hidden className="m-0 " style={{ whiteSpace: "break-spaces" }}>
<code className={`code inline-block w-full ${commonClassName}`}>
<div className="overflow-auto" style={{ maxHeight: `${21 * 7}px` }}>
<div className="relative overflow-hidden">
<pre aria-hidden className="m-0 ">
<code className={`inline-block w-full ${commonClassName}`}>
<span
style={{ whiteSpace: "break-spaces" }}
dangerouslySetInnerHTML={{
__html: syntaxHighlight(text, isVisible || isSecretFocused) ?? ""
}}
@@ -81,7 +83,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
style={{ whiteSpace: "break-spaces" }}
aria-label="secret value"
ref={ref}
className={`textarea absolute inset-0 block h-full resize-none overflow-hidden bg-transparent text-transparent focus:border-0 ${commonClassName}`}
className={`absolute inset-0 block h-full resize-none overflow-hidden bg-transparent text-transparent no-scrollbar focus:border-0 ${commonClassName}`}
value={text}
onChange={onInput}
onFocus={() => setIsSecretFocused.on()}
@@ -94,6 +96,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
{...props}
/>
</div>
</div>
);
}
);