Skip to content
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

SwitchProps interface is not exported #57

Open
claudvanbarret opened this issue Sep 3, 2020 · 0 comments
Open

SwitchProps interface is not exported #57

claudvanbarret opened this issue Sep 3, 2020 · 0 comments

Comments

@claudvanbarret
Copy link

I'm styling switch with styled-components in TypeScript like this:

import styled from "styled-components";
import Switch from "rc-switch";

export const StyledSwitch = styled(Switch)(({ checked, disabled }) => {
  position: "relative",
  borderRadius: "1rem",
  cursor: "pointer",
});

But I'm getting this error.

Exported variable 'StyledSwitch' has or is using name 'SwitchProps' from external module "/Users/claudvanbarret/project/node_modules/rc-switch/lib/index" but cannot be named.ts(4023)

This error can be probably is an issue in TypeScript, but wen can quickly solve this problem by exporting the SwitchProps interface.

I already send a pull request(#56) to fix it.

@claudvanbarret claudvanbarret changed the title SwitchProps interface it not exported SwitchProps interface is not exported Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant