Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 source pure

Package mdlist is a proof-of-concept for composable UIs patterns.

Readme View source

gno.land/p/moul/mdlist/v0

TODO: describe this package.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

gno.land/p/moul/mdlist/v0 dependency graph

⚠️ Disclaimer: provided as-is, without warranty; not security-audited. Full disclaimer: DISCLAIMER.

Overview

Package mdlist is a proof-of-concept for composable UIs patterns.

It allows specifying a data source and then dynamically rendering it as a list or a grid.

Types 2

type Entries

slice
1type Entries []Entry
source

Methods on Entries

func BulletList

method on Entries
1func (l Entries) BulletList() string
source

BulletList returns entries as a markdown bullet list without truncation.

func BulletListTruncated

method on Entries
1func (l Entries) BulletListTruncated(titleMaxLength, bodyMaxLength int) string
source

BulletListTruncated returns entries as a markdown bullet list with truncation.

func Columns

method on Entries
1func (l Entries) Columns() string
source

func NumberedList

method on Entries
1func (l Entries) NumberedList() string
source

NumberedList returns entries as a markdown numbered list without truncation.

func NumberedListTruncated

method on Entries
1func (l Entries) NumberedListTruncated(titleMaxLength, bodyMaxLength int) string
source

NumberedListTruncated returns entries as a markdown numbered list with truncation.

func Paragraphs

method on Entries
1func (l Entries) Paragraphs() string
source

Paragraphs returns entries as simple paragraphs with bold titles.

type Entry

struct
 1type Entry struct {
 2	// Title is the title of the entry. Required.
 3	Title string
 4	// Body is the body of the entry. Required.
 5	Body string
 6	// Link is the URL of the entry. Optional.
 7	Link string
 8	// Links is a list of additional URLs of the entry. Optional.
 9	Links []string
10}
source

Imports 2

Source Files 3