examples/README.md GIFs (#470)

* docs(examples): Add `examples/README.md`

Adds `examples/README.md` with GIFs of examples

* docs(examples): Individual READMEs

* docs(examples): add short description to each example
This commit is contained in:
Maas Lalani
2022-10-03 12:06:18 -04:00
committed by GitHub
parent cd3f486ab5
commit 70576bc9e0
41 changed files with 454 additions and 8 deletions

View File

@@ -0,0 +1,3 @@
# Composable Views
<img width="800" src="https://stuff.charm.sh/bubbletea-examples/composable-views.gif" />

View File

@@ -44,10 +44,14 @@ var (
spinner.Monkey,
}
modelStyle = lipgloss.NewStyle().
Padding(1, 2).
Width(15).
Height(5).
Align(lipgloss.Center, lipgloss.Center).
BorderStyle(lipgloss.HiddenBorder())
focusedModelStyle = lipgloss.NewStyle().
Padding(1, 2).
Width(15).
Height(5).
Align(lipgloss.Center, lipgloss.Center).
BorderStyle(lipgloss.NormalBorder()).
BorderForeground(lipgloss.Color("69"))
spinnerStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("69"))
@@ -124,7 +128,7 @@ func (m mainModel) View() string {
} else {
s += lipgloss.JoinHorizontal(lipgloss.Top, modelStyle.Render(fmt.Sprintf("%4s", m.timer.View())), focusedModelStyle.Render(m.spinner.View()))
}
s += helpStyle.Render(fmt.Sprintf("\ntab: change focused model • n: new %s • q: exit\n", model))
s += helpStyle.Render(fmt.Sprintf("\ntab: focus next • n: new %s • q: exit\n", model))
return s
}