on 8728a13 help sign in
skrepka/client/Labels.fs
23 lines 687 B history raw
1namespace Skrepka
3open Avalonia.Media
4open Avalonia.Media.TextFormatting
5open Fabulous.Avalonia
7open type Fabulous.Avalonia.View
9module Labels =
10 let private label size text =
11 TextBlock(text)
12 .fontFamily(FontFamily(Constants.fontFamily))
13 .fontWeight(FontWeight.Bold)
14 .fontSize(size)
15 .textWrapping(TextWrapping.Wrap)
17 let h1 text = label 32. text
18 let h2 text = label 24. text
19 let h3 text = label 20. text
20 let h4 text = label 16. text
21 let h5 text = label 14. text
22 let body text = label 14. text |> _.fontWeight(FontWeight.Normal)
23 let caption text = label 12. text |> _.fontWeight(FontWeight.Normal)