Skip to content

Commit 72b0cf7

Browse files
committed
DOMProps: type style prop Style { s }
1 parent 207d880 commit 72b0cf7

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

example/app/app.purs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ helloInConsole e = do
1919

2020
hello = mkUI spec do
2121
props <- getProps
22-
return $ h1 [className "Hello", onClick helloInConsole] [
22+
return $ h1 [
23+
className "Hello",
24+
onClick helloInConsole,
25+
style {background: "gray"}
26+
] [
2327
text "Hello, ",
2428
text props.name
2529
]

src/React/DOM.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ module React.DOM where
22

33
import React
44

5-
data DOMProps eff props state
6-
= Accept String
5+
data DOMProps s eff props state =
6+
Accept String
77
| AccessKey String
88
| Action String
99
| AllowFullScreen String
@@ -83,7 +83,7 @@ module React.DOM where
8383
| SrcSet String
8484
| Start String
8585
| Step String
86-
| Style String
86+
| Style { | s }
8787
| TabIndex String
8888
| Target String
8989
| Title String
@@ -290,7 +290,7 @@ module React.DOM where
290290
\ } \
291291
\ } \
292292
\ }"
293-
:: forall eff props state. String -> [DOMProps eff props state] -> [UI] -> UI
293+
:: forall s eff props state. String -> [DOMProps s eff props state] -> [UI] -> UI
294294

295295
foreign import text
296296
"function text(text) { \

0 commit comments

Comments
 (0)