Skip to content

Commit b57d8b0

Browse files
committedSep 1, 2021
feat(website): convert chart props files to TypeScript
1 parent e59add9 commit b57d8b0

File tree

28 files changed

+6
-7
lines changed

28 files changed

+6
-7
lines changed
 

‎website/src/data/components/sankey/props.js ‎website/src/data/components/sankey/props.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { SankeyDefaultProps as defaults, sankeyAlignmentPropKeys } from '@nivo/sankey'
1+
import { svgDefaultProps as defaults, sankeyAlignmentPropKeys } from '@nivo/sankey'
22
import { themeProperty, motionProperties, groupProperties } from '../../../lib/componentProperties'
3-
import { svgDefaultProps } from '@nivo/bar'
43

54
const props = [
65
{

‎website/src/pages/sankey/index.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import omit from 'lodash/omit'
33
import { generateSankeyData } from '@nivo/generators'
4-
import { ResponsiveSankey, SankeyDefaultProps } from '@nivo/sankey'
4+
import { ResponsiveSankey, svgDefaultProps } from '@nivo/sankey'
55
import { ComponentTemplate } from '../../components/components/ComponentTemplate'
66
import meta from '../../data/components/sankey/meta.yml'
77
import mapper from '../../data/components/sankey/mapper'
@@ -51,10 +51,10 @@ const initialProperties = {
5151
modifiers: [['darker', 1]],
5252
},
5353

54-
animate: SankeyDefaultProps.animate,
55-
motionConfig: SankeyDefaultProps.motionConfig,
54+
animate: svgDefaultProps.animate,
55+
motionConfig: svgDefaultProps.motionConfig,
5656

57-
isInteractive: SankeyDefaultProps.isInteractive,
57+
isInteractive: svgDefaultProps.isInteractive,
5858

5959
legends: [
6060
{
@@ -94,7 +94,7 @@ const Sankey = () => {
9494
currentFlavor="svg"
9595
properties={groups}
9696
initialProperties={initialProperties}
97-
defaultProperties={SankeyDefaultProps}
97+
defaultProperties={svgDefaultProps}
9898
propertiesMapper={mapper}
9999
generateData={generateData}
100100
>

0 commit comments

Comments
 (0)
Please sign in to comment.