Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat(treemap): fix static mapping and sample
  • Loading branch information
plouc committed Jan 2, 2022
1 parent 0fdd685 commit a7a4400
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/static/src/mappings/treemap.ts
@@ -1,14 +1,14 @@
import { FunctionComponent } from 'react'
import Joi from 'joi'
import { Dimensions } from '@nivo/core'
import { TreeMap, TreeMapSvgProps, DefaultTreeMapDatum } from '@nivo/treemap'
import { TreeMap, TreeMapSvgProps } from '@nivo/treemap'
import { custom } from './common'
import { ordinalColors, inheritedColor } from './commons/colors'
import { dimensions } from './commons/dimensions'
import { OmitStrict } from '../types'

export type TreeMapApiProps<Datum = DefaultTreeMapDatum> = OmitStrict<
TreeMapSvgProps<Datum> & Dimensions,
export type TreeMapApiProps = OmitStrict<
TreeMapSvgProps<object> & Dimensions,
| 'isInteractive'
| 'onMouseEnter'
| 'onMouseMove'
Expand Down
4 changes: 2 additions & 2 deletions packages/static/src/samples/index.ts
Expand Up @@ -154,7 +154,7 @@ export const samples: Record<
enableArcLabels: true,
arcLabelsSkipAngle: 10,
arcLabelsTextColor: { from: 'color', modifiers: [['darker', 1.4]] },
} as ChartProps<'sunburst'>,
},
},
treemap: {
type: 'treemap',
Expand All @@ -168,6 +168,6 @@ export const samples: Record<
leavesOnly: false,
innerPadding: 3,
outerPadding: 3,
} as unknown as ChartProps<'treemap'>,
},
},
}
1 change: 0 additions & 1 deletion packages/treemap/package.json
Expand Up @@ -40,7 +40,6 @@
},
"peerDependencies": {
"@nivo/core": "0.77.0",
"prop-types": ">= 15.5.10 < 16.0.0",
"react": ">= 16.14.0 < 18.0.0"
},
"publishConfig": {
Expand Down

0 comments on commit a7a4400

Please sign in to comment.