Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
fix: fix TextTab binding to emit correct export (#91)
Browse files Browse the repository at this point in the history
* fix: fix TextTab binding to emit correct export

- also speed up build script with `concurrently`
- trigger rebuild to fix wrong css being emitted (theme scope css excluded)

* release
  • Loading branch information
Jaeho Lee authored Dec 12, 2022
1 parent 0ff460b commit 9838320
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .changeset/eleven-walls-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@greenlabs/formula-components": patch
"@greenlabs/rescript-formula-components": patch
---

fix: fix TextTab binding to emit correct export
12 changes: 6 additions & 6 deletions packages/components-rescript/src/Formula__TextTab.res
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module List = {
@module("@greenlabs/formula-components") @react.component
@module("@greenlabs/formula-components") @scope("TextTab") @react.component
external make: (
~props: {..}=?,
~rootProps: {..}=?, // TODO: RadixUI props
Expand All @@ -8,7 +8,7 @@ module List = {
~onValueChange: string => unit=?,
~children: React.element,
~ref: ReactDOM.Ref.t=?,
) => React.element = "TextTab"
) => React.element = "List"
}

module Trigger = {
Expand All @@ -17,21 +17,21 @@ module Trigger = {
value?: int,
}

@module("@greenlabs/formula-components") @react.component
@module("@greenlabs/formula-components") @scope("TextTab") @react.component
external make: (
~icon: React.componentLike<{..}, React.element>=?, // FIXME: Icon component type
~title: string=?,
~badge: badgeType=?,
~value: string,
~children: React.element=?,
) => React.element = "TextTab"
) => React.element = "Trigger"
}

module Content = {
@module("@greenlabs/formula-components") @react.component
@module("@greenlabs/formula-components") @scope("TextTab") @react.component
external make: (
~value: string,
~children: React.element=?,
~props: ReactDOM.domProps=?,
) => React.element = "TextTab"
) => React.element = "Content"
}
4 changes: 2 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
"storybook": "start-storybook -p 6006",
"build:js": "rollup -c",
"build:types": "tsc -b",
"build:css": "cat ./dist/cjs/assets/**/*.css > ./dist/cjs/formula.css && cat ./dist/esm/assets/**/*.css > ./dist/esm/formula.css",
"build": "yarn clean && yarn build:js && yarn build:types && yarn build:css",
"build:css": "concurrently \"cat ./dist/cjs/assets/**/*.css > ./dist/cjs/formula.css\" \"cat ./dist/esm/assets/**/*.css > ./dist/esm/formula.css\"",
"build": "yarn clean && concurrently \"yarn build:js && yarn build:css\" \"yarn build:types\"",
"clean": "rm -rf ./dist",
"start": "concurrently -g -n re,storybook \"yarn re:watch\" \"yarn storybook\"",
"build:ts-icons": "cd src/Icon && yarn dlx @svgr/cli svgs --no-index && node ./templates/export-generator.js",
Expand Down

0 comments on commit 9838320

Please sign in to comment.