feat: expand advanced widget experiences
This commit is contained in:
1 parent
9437d211c8
commit
c099a8eef6
119 files changed
+3624
-844
No files matched your search
@@ -0,0 +1,13 @@
|
||||
interface NotebookDisplayInput {
|
||||
height: number;
|
||||
isAdvanced: boolean;
|
||||
isEditing: boolean;
|
||||
isSaving: boolean;
|
||||
showToolbar: boolean;
|
||||
}
|
||||
|
||||
export const getNotebookDisplay = ({ height, isAdvanced, isEditing, isSaving, showToolbar }: NotebookDisplayInput) => ({
|
||||
showToolbar: isEditing && !isSaving && (isAdvanced || showToolbar),
|
||||
toolbarMaxHeight: isAdvanced ? undefined : height < 180 ? "4.5rem" : "10rem",
|
||||
showDocumentStats: isAdvanced || height >= 180,
|
||||
});
|
||||
Reference in new issue
Block a user