Skip to content

Commit 521ddf5

Browse files
committed
Fix paddingInline #675 🐛
1 parent 790dd42 commit 521ddf5

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

playground/src/App.fs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,28 @@ module App
22

33
open Feliz
44
open Browser.Dom
5+
open Fable.Core
6+
7+
[<ReactComponent>]
8+
let MyCounter() =
9+
let (count, setCount) = React.useState(0)
10+
JSX.jsx $"""
11+
<div>
12+
{count}
13+
<div>
14+
<button onDoubleClick onClick={fun _ -> setCount(count + 1)}>Increment</button>
15+
</div>
16+
<div>
17+
<button onClick={fun _ -> setCount(count - 1)} >Decrement</button>
18+
</div>
19+
</div>
20+
"""
21+
|> unbox<ReactElement>
522

623
let App() =
724
Html.div [
825
prop.children [
926
Components.Components.Testing()
10-
Html.div "Test"
27+
MyCounter()
1128
]
1229
]

src/Feliz/Styles.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,12 +766,12 @@ type style =
766766
/// which maps to a physical padding properties depending on the element's
767767
/// writing mode, directionality, and text orientation.
768768
/// https://developer.mozilla.org/en-US/docs/Web/CSS/padding-inline
769-
static member inline paddingInline(value: int) = StyleHelper.mkStyle "marginInline" value
769+
static member inline paddingInline(value: int) = StyleHelper.mkStyle "paddingInline" value
770770
/// Defines the logical inline start and end paddings of an element,
771771
/// which maps to a physical padding properties depending on the element's
772772
/// writing mode, directionality, and text orientation.
773773
/// https://developer.mozilla.org/en-US/docs/Web/CSS/padding-inline
774-
static member inline paddingInline(value: ICssUnit) = StyleHelper.mkStyle "marginInline" value
774+
static member inline paddingInline(value: ICssUnit) = StyleHelper.mkStyle "paddingInline" value
775775
/// Defines the logical inline start and end paddings of an element,
776776
/// which maps to a physical padding properties depending on the element's
777777
/// writing mode, directionality, and text orientation.

0 commit comments

Comments
 (0)