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

Update tooltip TypeScript types. #657

Merged
merged 1 commit into from
Nov 20, 2019
Merged

Update tooltip TypeScript types. #657

merged 1 commit into from
Nov 20, 2019

Conversation

nfvs
Copy link
Contributor

@nfvs nfvs commented Aug 5, 2019

  • removed theme= from Basic/TableTooltip
  • define Chip

@nfvs nfvs force-pushed the tooltipTypes branch 2 times, most recently from c83d62f to d368ac2 Compare August 5, 2019 15:23
- removed theme= from Basic/TableTooltip
- define Chip
Copy link
Contributor

@wyze wyze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This is what I have been using locally.

@nfvs
Copy link
Contributor Author

nfvs commented Aug 5, 2019

@wyze maybe not the best forum to ask this, but what's the best way to use such a fork in a project? Importing the git repo in package.json doesn't seem work.

@wyze
Copy link
Contributor

wyze commented Aug 5, 2019

We have it set in tsconfig.json like so:

{
  "files": [
    "@nivo/core.d.ts",
    "@nivo/sankey.d.ts",
    "@nivo/scales.d.ts",
    "@nivo/tooltip.d.ts",
    "global.d.ts"
  ]
}

And then directories are relative to that. So you would have a folder called @nivo, then in that folder have files that correspond to above. Example, @nivo/tooltip.d.ts:

declare module '@nivo/tooltip' {
  export interface ChipProps {
    size?: number
    color: string
    style?: Partial<React.CSSProperties>
  }

  export class Chip extends React.Component<ChipProps> {}
}

@plouc plouc merged commit 305a536 into plouc:master Nov 20, 2019
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

Successfully merging this pull request may close these issues.

3 participants