@atlaskit/forge-react-types
v1.6.2
Published
Component types for Forge UI Kit React components
Downloads
59,391
Readme
Forge React Types
This package is for EXTERNAL use only and does not comply with Isolated Declarations. Consuming this inside AFM will cause issues with typecheck. Please seek guidance from Loop Experiences before using
This package exposes a public npm package (@atlaskit/forge-react-types) that contains all
necessary types for UIKit codegen components.
The types are code generated from the @atlassian/forge-ui package and are guaranteed to be in sync
with the source component implementation in the @atlassian/forge-ui package.
Additionally, the package syncs ADS component related dependencies from @atlassian/forge-ui
package, to ensure that the types are in sync with the source component implementation. This allows
@forge/react package to have the consistent ADS component dependencies to the AFM platform, instead
of being bounded by other dependencies in the Forge mono-repo.
Usage
To generate / update all types, run the following command:
yarn workspace @atlaskit/forge-react-types codegenDuring development, the codegen command can be run for a specific component:
yarn workspace @atlaskit/forge-react-types codegen <component-name>e.g.
yarn workspace @atlaskit/forge-react-types codegen ButtonNOTE: Make sure any new component prop types are being exported from
packages/forge/forge-react-types/src/components/__generated__/index.ts
Generating global component types
To generate global component types, run the following command:
yarn workspace @atlaskit/forge-react-types codegen-globalThis will generate the global component types found in forge-common-app-gateway package into /src/components/global/__generated__/index.ts.
