refactor(web): descriptions (#6517)

* refactor: reusable autogrow

* fix: remove useless autogrow

* fix: correct size for album description

* fix: format

* fix: move to own file

* refactor: album description

* refactor: asset description

* simplify

* fix: style when no description provided

* fix: switching assets

* feat: update description with ctrl + enter

* fix: variable name

* fix: styling

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
martin 2024-01-22 05:47:55 +01:00 committed by GitHub
parent 95cfe22866
commit 3845fec280
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 97 additions and 124 deletions

View file

@ -0,0 +1,5 @@
export const autoGrowHeight = (textarea: HTMLTextAreaElement, height = 'auto') => {
textarea.scrollHeight;
textarea.style.height = height;
textarea.style.height = `${textarea.scrollHeight}px`;
};