Skip to content

Commit

Permalink
expanded justify items
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartaccent committed Jun 4, 2024
1 parent fde92d6 commit dacd0f8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Added new props:
Expanded props:

- justify-content
- justify-items

### v0.1.0

Expand Down
16 changes: 12 additions & 4 deletions props/justify_items.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ package props
type JustifyItems string

const (
JustifyItemsStretch JustifyItems = "stretch"
JustifyItemsCenter JustifyItems = "center"
JustifyItemsStart JustifyItems = "start"
JustifyItemsEnd JustifyItems = "end"
JustifyItemsNormal JustifyItems = "normal"
JustifyItemsStretch JustifyItems = "stretch"
JustifyItemsCenter JustifyItems = "center"
JustifyItemsStart JustifyItems = "start"
JustifyItemsEnd JustifyItems = "end"
JustifyItemsFlexStart JustifyItems = "flex-start"
JustifyItemsFlexEnd JustifyItems = "flex-end"
JustifyItemsSelfStart JustifyItems = "self-start"
JustifyItemsSelfEnd JustifyItems = "self-end"
JustifyItemsLeft JustifyItems = "left"
JustifyItemsRight JustifyItems = "right"
JustifyItemsBaseline JustifyItems = "baseline"
)

func (j JustifyItems) String() string {
Expand Down
8 changes: 8 additions & 0 deletions style_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,10 +836,18 @@ func TestStyle_JustifyContent(t *testing.T) {

func TestStyle_JustifyItems(t *testing.T) {
testCases := map[props.JustifyItems]string{
props.JustifyItemsNormal: "normal",
props.JustifyItemsStretch: "stretch",
props.JustifyItemsCenter: "center",
props.JustifyItemsStart: "start",
props.JustifyItemsEnd: "end",
props.JustifyItemsFlexStart: "flex-start",
props.JustifyItemsFlexEnd: "flex-end",
props.JustifyItemsSelfStart: "self-start",
props.JustifyItemsSelfEnd: "self-end",
props.JustifyItemsLeft: "left",
props.JustifyItemsRight: "right",
props.JustifyItemsBaseline: "baseline",
props.JustifyItems("inherit"): "inherit",
}

Expand Down

0 comments on commit dacd0f8

Please sign in to comment.