mirror of
https://github.com/phranck/TUIkit.git
synced 2026-06-20 09:54:37 +00:00
- Remove abandoned half-padding feature from BorderModifier - Simplify block appearance rendering in BorderModifier, ContainerView, Menu - Update theme colors for all 4 phosphor themes (container backgrounds) - Fix VStack alignment (leading/center/trailing now work correctly) - Improve ContainersPage demos (alignment, padding display) - Replace hardcoded colors with theme colors in DemoSection - Update documentation (memory.md, whats-next.md, to-dos.md)
47 lines
1.4 KiB
Swift
47 lines
1.4 KiB
Swift
//
|
|
// TextStylesPage.swift
|
|
// TUIKitExample
|
|
//
|
|
// Demonstrates text styling capabilities.
|
|
//
|
|
|
|
import TUIKit
|
|
|
|
/// Text styles demo page.
|
|
///
|
|
/// Shows various text styling options including:
|
|
/// - Basic styles (bold, italic, underline, etc.)
|
|
/// - Combined styles
|
|
/// - Special effects (blink, inverted)
|
|
struct TextStylesPage: View {
|
|
var body: some View {
|
|
VStack(spacing: 1) {
|
|
HeaderView(title: "Text Styles Demo")
|
|
|
|
DemoSection("Basic Styles") {
|
|
Text("Normal text - no styling applied")
|
|
Text("Bold text").bold()
|
|
Text("Italic text").italic()
|
|
Text("Underlined text").underline()
|
|
Text("Strikethrough text").strikethrough()
|
|
Text("Dimmed text").dim()
|
|
}
|
|
|
|
DemoSection("Combined Styles") {
|
|
Text("Bold + Italic").bold().italic()
|
|
Text("Bold + Underline").bold().underline()
|
|
Text("Bold + Color").bold().foregroundColor(.theme.accent)
|
|
Text("Italic + Dim").italic().dim()
|
|
Text("All combined").bold().italic().underline().foregroundColor(.theme.accent)
|
|
}
|
|
|
|
DemoSection("Special Effects") {
|
|
Text("Blinking text (if terminal supports)").blink()
|
|
Text("Inverted colors").inverted()
|
|
}
|
|
|
|
Spacer()
|
|
}
|
|
}
|
|
}
|