-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Guillaume Hivert <[email protected]>
- Loading branch information
Showing
2 changed files
with
61 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import gleam/list | ||
import lustre/element/html as h | ||
import sketch as s | ||
|
||
pub fn keyword(text: String) { | ||
s.class([s.color("#c678dd")]) | ||
|> s.memo() | ||
|> s.to_lustre() | ||
|> list.prepend([], _) | ||
|> h.span([h.text(text)]) | ||
} | ||
|
||
pub fn fun(text: String) { | ||
s.class([s.color("#61afef")]) | ||
|> s.memo() | ||
|> s.to_lustre() | ||
|> list.prepend([], _) | ||
|> h.span([h.text(text)]) | ||
} | ||
|
||
pub fn label(text: String) { | ||
s.class([s.color("#e06c75")]) | ||
|> s.memo() | ||
|> s.to_lustre() | ||
|> list.prepend([], _) | ||
|> h.span([h.text(text)]) | ||
} | ||
|
||
pub fn type_(text: String) { | ||
s.class([s.color("#e5c07b")]) | ||
|> s.memo() | ||
|> s.to_lustre() | ||
|> list.prepend([], _) | ||
|> h.span([h.text(text)]) | ||
} | ||
|
||
pub fn variable(text: String) { | ||
s.class([s.color("#98c379")]) | ||
|> s.memo() | ||
|> s.to_lustre() | ||
|> list.prepend([], _) | ||
|> h.span([h.text(text)]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters