Skip to content

Commit e5a009e

Browse files
committed
cursor icons; prefer if pattern syntax
1 parent 4845bbd commit e5a009e

File tree

2 files changed

+240
-323
lines changed

2 files changed

+240
-323
lines changed

README.mbt.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ moon add tiye/respo_css
3030

3131
```moonbit
3232
// Create basic styles
33+
///|
3334
let style : RespoStyle = respo_style(
3435
color=CssColor::Red,
3536
font_size=16,
3637
margin=CssSize::Px(10.0),
37-
display=CssDisplay::Flex
38+
display=CssDisplay::Flex,
3839
)
3940
4041
// Convert to CSS string
42+
43+
///|
4144
let _css_string : String = style.to_string()
4245
// Output: "color:red; font-size:16px; margin:10px; display:flex; "
4346
```
@@ -46,13 +49,23 @@ let _css_string : String = style.to_string()
4649

4750
```moonbit
4851
// Create multiple styles
52+
///|
4953
let base_style : RespoStyle = respo_style(color=CssColor::Blue, font_size=14)
50-
let layout_style : RespoStyle = respo_style(display=CssDisplay::Grid, gap=CssSize::Px(20.0))
54+
55+
///|
56+
let layout_style : RespoStyle = respo_style(
57+
display=CssDisplay::Grid,
58+
gap=CssSize::Px(20.0),
59+
)
5160
5261
// Merge styles
62+
63+
///|
5364
let combined : RespoStyle = base_style.merge(layout_style)
5465
5566
// Add custom properties
67+
68+
///|
5669
let _extended : RespoStyle = combined.add("custom-property", "custom-value")
5770
```
5871

0 commit comments

Comments
 (0)