layouts

An app state of component layouts. To get the layouts state:

const { layouts } = inkdrop.store.getState()

Or, to connect with your React component:

import { connect } from "react-redux"

const connector = connect(
  ({ layouts }) => ({ layouts }),
  dispatch => ({ dispatch })
)

const MyComponent = connector(props => {
  // render
})

Data Structure

A map of [layout_name]: LayoutComponents where:

  • layout_name: String
  • LayoutComponents: A class name of React component

main:full

The main layout that consists of 3 columns.

Default value

["ModalLayout", "SideBarLayout", "NoteListBarLayout", "EditorLayout"]

main:slim

The main layout that consists of 2 columns.

Default value

["ModalLayout", "NoteListBarLayout", "EditorLayout"]

main:distraction-free

The main layout for distraction-free mode.

Default value

["ModalLayout", "EditorLayout"]

The sidebar layout

Default value

["SideBarHeader", "SideBarNavigation", "SideBarSyncStatusView"]

The menu layout of sidebar

Default value

[
  "SideBarMenuItemAllNotes",
  "SideBarMenuItemSearch",
  "SideBarMenuSectionNotebooks",
  "SideBarMenuBookList",
  "SideBarMenuItemTrash",
  "SideBarMenuSectionStatus",
  "SideBarMenuStatusList",
  "SideBarMenuSectionTags",
  "SideBarMenuTagList"
]

The menu layout of sidebar book filter

Default value

[
  "SidebarBookFilterTitle",
  "SideBarMenuSectionStatus",
  "SidebarBookFilterStatusList",
  "SideBarMenuSectionTags",
  "SidebarBookFilterTagList"
]

note-list-bar

The menu layout of note list bar

Default value

["NoteListHeader", "NoteListSearchBar", "NoteListBarContainer"]

note-list-bar:trash

The trash menu layout of note list bar

Default value

["NoteListHeader", "NoteListBarContainer"]

mde

The mde layout

Default value

["Editor"]

editor

The editor layout

Default value

[
  "EditorHeaderLayout",
  "EditorTitleInput",
  "EditorMetaLayout",
  "EditorToolbar",
  "MDELayout",
  "MDESearchBar"
]

editor-header

The header layout of the editor

Default value

[
  "EditorHeaderItemNavigationButtons",
  "EditorHeaderItemNotebook",
  "EditorHeaderItemCreatedDate",
  "EditorHeaderItemUpdatedDate",
  "EditorHeaderItemSpacer",
  "EditorHeaderItemActions"
]

editor-meta

The meta pane layout of the editor

Default value

["EditorMetaStatusPicker", "EditorMetaTags"]

The layout for modal components

Default value

[
  "NewNotebookDialog",
  "DeleteNotebookDialog",
  "RenameNotebookDialog",
  "TagSettingsDialog",
  "DeleteTagDialog",
  "AssistiveErrorDialog",
  "MoveNotesDialog",
  "MoveNotebookDialog",
  "EmptyTrashDialog",
  "ShareNoteDialog",
  "NoteRevisionsDialog"
]

editor-toolbar

The toolbar layout of the editor

Default value

[]

editor-status-bar

The status bar layout of the editor

Default value

[]

Can you help us improve these docs?

The source of these docs is here on GitHub. If you see a way these docs can be improved, please fork us!