logseq/deps/shui
charlie c3b401ca64 enhance(ui): refactor the global context menu with the shui popup 2024-03-18 14:51:12 +08:00
..
.clj-kondo shui/table introduction 2023-05-12 13:24:54 -04:00
shui-graph Merge branch 'master' into feat/db 2023-11-14 20:40:36 +08:00
src/logseq/shui enhance(ui): refactor the global context menu with the shui popup 2024-03-18 14:51:12 +08:00
README.md shui/table introduction 2023-05-12 13:24:54 -04:00
deps.edn Feat: New UI components (#10694) 2023-12-26 16:31:37 +08:00

README.md

Description

This library provides a set of UI components for use within logseq.

API

This library is under the parent namespace logseq.shui. This library provides several namespaces, all of which will be versioned, with the exception of logseq.shui.context.

An example of a versioned namespace is the table namespace:

logseq.shui.table.v2

root components are exported from each versioned file to indicate the root component to be rendered:

logseq.shui.table.v2/root

Each root component should expect two arguments, props and context.

props

Ultimately, components in shui will need to be used by JavaScript. While it is idiomatic in clojure to use a list of properties, it is idiomatic in react to use a single props map. Shui components should therefore stick to this convention when possible to ease the conversion between the two languages.

context

Context is a set of functions that call back to the main application. These are abstracted out into a context object to make it clear what is used internally, and what is used externally.