feat: Add assignment component with drag and drop to Set node (#8283)

Co-authored-by: Giulio Andreini <andreini@netseven.it>
This commit is contained in:
Elias Meire
2024-02-06 18:34:34 +01:00
committed by GitHub
parent c04f92f7fd
commit 2799de491b
53 changed files with 3296 additions and 1060 deletions

View File

@@ -15,11 +15,12 @@ const commonThemeProps = {
},
};
export const inputTheme = ({ isSingleLine } = { isSingleLine: false }) => {
export const inputTheme = ({ rows } = { rows: 5 }) => {
const maxHeight = Math.max(rows * 22 + 8);
const theme = EditorView.theme({
...commonThemeProps,
'&': {
maxHeight: isSingleLine ? '30px' : '112px',
maxHeight: `${maxHeight}px`,
minHeight: '30px',
width: '100%',
fontSize: 'var(--font-size-2xs)',