mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 23:34:00 +01:00
style: sticky input
This commit is contained in:
parent
bdcaa35b98
commit
17e37a3d79
|
@ -357,19 +357,25 @@ const EditView = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<textarea
|
<div
|
||||||
ref={textareaRef}
|
className={`w-full ${
|
||||||
className={`m-0 resize-none rounded-lg bg-transparent overflow-y-hidden focus:ring-0 focus-visible:ring-0 leading-7 ${
|
sticky
|
||||||
sticky ? 'border border-gray-400/30 px-2 py-1' : 'focus:outline-none'
|
? 'py-2 md:py-3 px-2 md:px-4 border border-black/10 bg-white dark:border-gray-900/50 dark:text-white dark:bg-gray-700 rounded-md shadow-[0_0_10px_rgba(0,0,0,0.10)] dark:shadow-[0_0_15px_rgba(0,0,0,0.10)]'
|
||||||
|
: ''
|
||||||
}`}
|
}`}
|
||||||
onChange={(e) => {
|
>
|
||||||
_setContent(e.target.value);
|
<textarea
|
||||||
}}
|
ref={textareaRef}
|
||||||
value={_content}
|
className='m-0 resize-none rounded-lg bg-transparent overflow-y-hidden focus:ring-0 focus-visible:ring-0 leading-7 w-full'
|
||||||
onInput={handleInput}
|
onChange={(e) => {
|
||||||
onKeyDown={handleKeyDown}
|
_setContent(e.target.value);
|
||||||
rows={1}
|
}}
|
||||||
></textarea>
|
value={_content}
|
||||||
|
onInput={handleInput}
|
||||||
|
onKeyDown={handleKeyDown}
|
||||||
|
rows={1}
|
||||||
|
></textarea>
|
||||||
|
</div>
|
||||||
<div className='text-center mt-2 flex justify-center'>
|
<div className='text-center mt-2 flex justify-center'>
|
||||||
{sticky && (
|
{sticky && (
|
||||||
<button
|
<button
|
||||||
|
|
Loading…
Reference in a new issue