Skip to content

Commit a7a4400

Browse files
committedJan 2, 2022
feat(treemap): fix static mapping and sample
1 parent 0fdd685 commit a7a4400

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed
 

‎packages/static/src/mappings/treemap.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { FunctionComponent } from 'react'
22
import Joi from 'joi'
33
import { Dimensions } from '@nivo/core'
4-
import { TreeMap, TreeMapSvgProps, DefaultTreeMapDatum } from '@nivo/treemap'
4+
import { TreeMap, TreeMapSvgProps } from '@nivo/treemap'
55
import { custom } from './common'
66
import { ordinalColors, inheritedColor } from './commons/colors'
77
import { dimensions } from './commons/dimensions'
88
import { OmitStrict } from '../types'
99

10-
export type TreeMapApiProps<Datum = DefaultTreeMapDatum> = OmitStrict<
11-
TreeMapSvgProps<Datum> & Dimensions,
10+
export type TreeMapApiProps = OmitStrict<
11+
TreeMapSvgProps<object> & Dimensions,
1212
| 'isInteractive'
1313
| 'onMouseEnter'
1414
| 'onMouseMove'

‎packages/static/src/samples/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export const samples: Record<
154154
enableArcLabels: true,
155155
arcLabelsSkipAngle: 10,
156156
arcLabelsTextColor: { from: 'color', modifiers: [['darker', 1.4]] },
157-
} as ChartProps<'sunburst'>,
157+
},
158158
},
159159
treemap: {
160160
type: 'treemap',
@@ -168,6 +168,6 @@ export const samples: Record<
168168
leavesOnly: false,
169169
innerPadding: 3,
170170
outerPadding: 3,
171-
} as unknown as ChartProps<'treemap'>,
171+
},
172172
},
173173
}

‎packages/treemap/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
},
4141
"peerDependencies": {
4242
"@nivo/core": "0.77.0",
43-
"prop-types": ">= 15.5.10 < 16.0.0",
4443
"react": ">= 16.14.0 < 18.0.0"
4544
},
4645
"publishConfig": {

0 commit comments

Comments
 (0)
Please sign in to comment.