Skip to content

Commit

Permalink
generate text-align property, update figma.json
Browse files Browse the repository at this point in the history
  • Loading branch information
myrho committed Oct 22, 2024
1 parent cc3fca1 commit 2623dd0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions codegen/src/Generate/Html/TypeStyle.elm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ toStyles : ColorMap -> TypeStyle -> List Elm.Expression
toStyles colorMap node =
[]
|> m (List.singleton >> Css.fontFamilies) node.fontFamily
|> m textAlign node.textAlignHorizontal
--|> m italic node.italic
|> m (round >> Css.int >> intOrAutoType >> Css.fontWeight) node.fontWeight
|> m (Css.px >> Css.fontSize) node.fontSize
Expand All @@ -21,6 +22,22 @@ toStyles colorMap node =
|> mm textAutoResize node.textAutoResize


textAlign : TypeStyleTextAlignHorizontal -> Elm.Expression
textAlign arg1 =
case arg1 of
TypeStyleTextAlignHorizontalCENTER ->
Css.property "text-align" "center"

TypeStyleTextAlignHorizontalLEFT ->
Css.property "text-align" "left"

TypeStyleTextAlignHorizontalRIGHT ->
Css.property "text-align" "right"

TypeStyleTextAlignHorizontalJUSTIFIED ->
Css.property "text-align" "justifed"


textAutoResize : TypeStyleTextAutoResize -> List Elm.Expression
textAutoResize arg1 =
case arg1 of
Expand Down
2 changes: 1 addition & 1 deletion theme/figma.json

Large diffs are not rendered by default.

0 comments on commit 2623dd0

Please sign in to comment.