Skip to content

Commit

Permalink
fix(ink): fix wrong style bindings (#18)
Browse files Browse the repository at this point in the history
* fix(ink): fix wrong style bindings

* add changeset
  • Loading branch information
cometkim committed Jul 25, 2021
1 parent 0cb6e6f commit d66a789
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 27 deletions.
9 changes: 9 additions & 0 deletions .changeset/olive-clouds-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"rescript-ink": minor
"@rescript-ink/ink-big-text": minor
"@rescript-ink/ink-link": minor
"@rescript-ink/ink-spinner": minor
"@rescript-ink/ink-text-input": minor
---

Fix wrong style bindings
8 changes: 4 additions & 4 deletions packages/ink-big-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
"bsconfig.json"
],
"peerDependencies": {
"ink": "^3.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"rescript-ink": "workspace:^1.0.0",
"ink": "^3.0.0"
"rescript-ink": "workspace:^1.0.0"
},
"dependencies": {
"ink-big-text": "^1.2.0"
},
"devDependencies": {
"@rescript/react": "^0.10.3",
"ink": "^3.0.0",
"rescript": "^9.1.4",
"rescript-ink": "workspace:^1.0.0",
"ink": "^3.0.0"
"rescript-ink": "workspace:^1.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/ink-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
"prepack": "pnpm build"
},
"peerDependencies": {
"ink": "^3.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"rescript-ink": "workspace:^1.0.0",
"ink": "^3.0.0"
"rescript-ink": "workspace:^1.0.0"
},
"dependencies": {
"ink-link": "^2.0.0"
},
"devDependencies": {
"@rescript/react": "^0.10.3",
"ink": "^3.0.0",
"rescript": "^9.1.4",
"rescript-ink": "workspace:^1.0.0",
"ink": "^3.0.0"
"rescript-ink": "workspace:^1.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/ink-spinner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
"prepack": "pnpm build"
},
"peerDependencies": {
"ink": "^3.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"rescript-ink": "workspace:^1.0.0",
"ink": "^3.0.0"
"rescript-ink": "workspace:^1.0.0"
},
"dependencies": {
"ink-spinner": "^4.0.2"
},
"devDependencies": {
"@rescript/react": "^0.10.3",
"ink": "^3.0.0",
"rescript": "^9.1.4",
"rescript-ink": "workspace:^1.0.0",
"ink": "^3.0.0"
"rescript-ink": "workspace:^1.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/ink-text-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
"bsconfig.json"
],
"peerDependencies": {
"ink": "^3.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"rescript-ink": "workspace:^1.0.0",
"ink": "^3.0.0"
"rescript-ink": "workspace:^1.0.0"
},
"dependencies": {
"ink-text-input": "^4.0.1"
},
"devDependencies": {
"@rescript/react": "^0.10.3",
"ink": "^3.0.0",
"rescript": "^9.1.4",
"rescript-ink": "workspace:^1.0.0",
"ink": "^3.0.0"
"rescript-ink": "workspace:^1.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/ink/src/Ink_Components_Box.res
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ let makeProps = (
~flexDirection: option<flexDirection>=?,
~alignItems: option<alignItems>=?,
~justifyContent: option<justifyContent>=?,
~width: option<length>=?,
~minWidth: option<length>=?,
~height: option<length>=?,
~minHeight: option<length>=?,
~width: option<size>=?,
~minWidth: option<[#length(length)]>=?,
~height: option<size>=?,
~minHeight: option<[#length(length)]>=?,
~margin: option<length>=?,
~marginX: option<length>=?,
~marginY: option<length>=?,
Expand Down
18 changes: 11 additions & 7 deletions packages/ink/src/Ink_Style.res
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ type length = int

type percent = float

type size = [
| #length(length)
| #percent(percent)
]

type textWrap = [
| #wrap
| #end
Expand Down Expand Up @@ -84,31 +89,30 @@ type display = [
]

type alignItems = [
| #row
| #column
| #"row-reverse"
| #"column-reverse"
| #"flex-start"
| #center
| #"flex-end"
]

type alignSelf = [
| #auto
| #"flex-start"
| #center
| #"flex-end"
| #stretch
]

type justifyContent = [
| #"flex-start"
| #center
| #"flex-end"
| #"space-between"
| #"space-around"
| #center
]

type flexDirection = [
| #row
| #column
| #"row-reverse"
| #column
| #"column-reverse"
]

Expand Down

0 comments on commit d66a789

Please sign in to comment.