Skip to content

Commit

Permalink
Fix fontWeight again
Browse files Browse the repository at this point in the history
  • Loading branch information
cknitt committed Mar 4, 2024
1 parent 4708a2b commit 87b0cc3
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion src/apis/Style.res
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,36 @@ type resizeMode = [#cover | #contain | #stretch | #repeat | #center]

type fontStyle = [#normal | #italic]

type fontWeight = [#normal | #bold | #100 | #200 | #300 | #400 | #500 | #600 | #700 | #800 | #900]
module FontWeight = {
// Note: we cannot model this as a polymorphic variant
// because #"100" = #100 = the number 100 in JS, but we need the string "100" here.
type t = string

@inline
let normal = "normal"
@inline
let bold = "bold"
@inline
let _100 = "100"
@inline
let _200 = "200"
@inline
let _300 = "300"
@inline
let _400 = "400"
@inline
let _500 = "500"
@inline
let _600 = "600"
@inline
let _700 = "700"
@inline
let _800 = "800"
@inline
let _900 = "900"
}

type fontWeight = FontWeight.t

// @todo in 0.71.0
// Apparently there are more `fontVariant` options IOS specific
Expand Down

0 comments on commit 87b0cc3

Please sign in to comment.