@stenajs-webui/core
v23.8.1
Published
The core library for @stenajs-webui.
Keywords
Readme
stenajs-webui/core
The core library for @stenajs-webui.
All other packages depend on core.
View components
Layout
Box is the main building stone which most other components are derived from.
Components derived from Box
- Column (same as Box, content is placed in a column)
- Row (same as Box, content is placed in a row)
- Indent
- Space
- Spacing
Interaction
Decorators
- SeparatorLine
Hooks
core includes a collection of hooks.
See src/hooks/README.md for details.
Comparators
There are a few comparators that can be used to sort arrays of objects.
- byStringField
- byNumberField
const r = users
.filter((user) => user.age > 17)
.toSorted(byStringField((i) => i.name))
.toReversed()
.map((p) => `${p.firstName} ${p.lastName}`)
.join(", ");