-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shahrul
committed
Sep 1, 2024
1 parent
917f53f
commit e3966be
Showing
4 changed files
with
18 additions
and
12 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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
local class = "container" | ||
local val = 'value' | ||
local myElement = <div id="foo" bar="bar" d="1" class={class} val={val}>Hello, world!</div> | ||
local attr = { class = "container", val = 'value' } | ||
local myElement = <div id="foo" bar="bar" d="1" class={attr.class} val={attr.val}>Hello, world!</div> | ||
return myElement |
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
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
local div_class = "container" | ||
local p_class = "title" | ||
local p_inner = "Hello, world!" | ||
local span_style = "color: red;" | ||
local span_inner = "This is a span" | ||
local v = { | ||
div_class = "container", | ||
p_class = "title", | ||
p_inner = "Hello, world!", | ||
span_style = "color: red;", | ||
span_inner = "This is a span", | ||
} | ||
|
||
local el = <div id="div_1" class={div_class}><p id="p_2" style="border: 1px solid red;" class={p_class}>{p_inner}</p></div> | ||
local el = <div id="div_1" class={v.div_class}><p id="p_2" style="border: 1px solid red;" class={v.p_class}>{v.p_inner}</p></div> | ||
return el |