-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SashContent children and Typescript #16
Comments
Same here |
In my case it was because i was using |
Maybe you need to add sashRender paras like this: https://codesandbox.io/s/split-pane-themes-xmsqtt |
I guess it's a bug in the definition of the Instead of declaring it as type Using React with Typescript, |
FYI I too get the error in the OP if I try to compile this code using TypeScript. The code in question is in (and copied from) the themes demo e.g.: That demo is a *.jsx file not a *.tsx file. |
I worked-around this problem by using the normal typescript instead of trying to use a theme, and instead adding some CSS to get something looking like the "line" style. sashRender={(_, active) => <SashContent active={active} type="vscode"></SashContent>} and .split-sash-content.split-sash-content-vscode {
background-color: rgb(200,200,200);
width: 2px;
}
.split-sash-content.split-sash-content-vscode.split-sash-content-active {
width: 100%;
} |
I'm trying to use this in a Next w/Typescript project:
Typescript complains about the span element:
Do I need to add anything to allow the element or is this a bug in split-pane-react?
On the interface, I see children is defined as JSX.Element[]
The text was updated successfully, but these errors were encountered: