I am trying to wrap each component with a higher-order function and then re-export them in my library for further use. However, with Stepper, I am getting the following error:
Exported variable 'Stepper' has or is using name 'StepperProps' from external module "/home/xiongjr/git/jtc-oneui-react/node_modules/@govtechsg/sgds-react/Stepper/Stepper" but cannot be named.ts(4023)
This is a simplified example of what I am trying to do:
import { Stepper as SgdsStepper, useStep as SgdsUseStep } from "@govtechsg/sgds-react/Stepper"
import withSx from "../utils/withSx";
const Stepper = withSx(SgdsStepper)
export { Stepper }
I think the issue lies in the fact that StepperProps is not exported from Stepper.tsx. In all other components, component props are also exported.
Prerequisites
Describe the issue
I am trying to wrap each component with a higher-order function and then re-export them in my library for further use. However, with Stepper, I am getting the following error:
This is a simplified example of what I am trying to do:
I think the issue lies in the fact that StepperProps is not exported from Stepper.tsx. In all other components, component props are also exported.
Suggestion Add export to StepperProps:
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
No response
Describe your frontend stack. What version of React and @govtechsg/sgds-react are you using? CSR or SSR?
React v17, sgds-react v2.5.1