Skip to content

Commit

Permalink
feat(components): fix components display name
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte authored and Raphaël Benitte committed Aug 30, 2018
1 parent 4324706 commit 84aa832
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 34 deletions.
20 changes: 0 additions & 20 deletions .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,6 @@ setDefaults({
fontSize: '22px',
},
},
/*
header: {
h1: {
margin: 0,
padding: 0,
fontSize: '35px',
},
h2: {
margin: '0 0 10px 0',
padding: 0,
fontWeight: 400,
fontSize: '22px',
},
body: {
borderBottom: '1px solid #eee',
paddingTop: 10,
marginBottom: 10,
},
},
*/
},
})
setAddon(infoAddon)
Expand Down
5 changes: 4 additions & 1 deletion packages/circle-packing/src/Bubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,7 @@ const Bubble = ({

Bubble.displayName = 'Bubble'

export default enhance(Bubble)
const enhancedBubble = enhance(Bubble)
enhancedBubble.displayName = 'Bubble'

export default enhancedBubble
5 changes: 4 additions & 1 deletion packages/circle-packing/src/BubbleCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,7 @@ class BubbleCanvas extends Component {

BubbleCanvas.displayName = 'BubbleCanvas'

export default enhance(BubbleCanvas)
const enhancedBubbleCanvas = enhance(BubbleCanvas)
enhancedBubbleCanvas.displayName = 'BubbleCanvas'

export default enhancedBubbleCanvas
5 changes: 4 additions & 1 deletion packages/circle-packing/src/BubbleHtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,7 @@ const BubbleHtml = ({

BubbleHtml.displayName = 'BubbleHtml'

export default enhance(BubbleHtml)
const enhancedBubbleHtml = enhance(BubbleHtml)
enhancedBubbleHtml.displayName = 'BubbleHtml'

export default enhancedBubbleHtml
2 changes: 1 addition & 1 deletion packages/line/src/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,6 @@ const enhance = compose(
)

const enhancedLine = enhance(Line)
enhancedLine.displayName = 'enhance(Line)'
enhancedLine.displayName = 'Line'

export default enhancedLine
2 changes: 1 addition & 1 deletion packages/line/stories/line.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ stories.add(
withInfo(`
Please note that when using stacked y scale with variable length/data holes,
if one of the y value is \`null\` all subsequent values will be skipped
as we cannot compute the sum.
as we cannot properly compute the sum.
`)(() => (
<Line
{...commonProperties}
Expand Down
2 changes: 1 addition & 1 deletion packages/radar/src/Radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,6 @@ const enhance = compose(
)

const enhancedRadar = enhance(Radar)
enhancedRadar.displayName = 'enhance(Radar)'
enhancedRadar.displayName = 'Radar'

export default enhancedRadar
5 changes: 4 additions & 1 deletion packages/sankey/src/Sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import SankeyLinks from './SankeyLinks'
import SankeyLabels from './SankeyLabels'
import { SankeyPropTypes, sankeyAlignmentFromProp } from './props'
import enhance from './enhance'
import enhancedLine from '../../line/src/Line'

const getId = d => d.id

Expand Down Expand Up @@ -217,5 +218,7 @@ const Sankey = ({
}

Sankey.propTypes = SankeyPropTypes
const enhancedSankey = enhance(Sankey)
enhancedSankey.displayName = 'Sankey'

export default enhance(Sankey)
export default enhancedSankey
2 changes: 1 addition & 1 deletion packages/sankey/stories/sankey.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Sankey } from '../index'

const commonProperties = {
width: 900,
height: 500,
height: 400,
margin: { top: 0, right: 80, bottom: 0, left: 80 },
data: generateSankeyData({ nodeCount: 11, maxIterations: 2 }),
colors: 'd310',
Expand Down
3 changes: 3 additions & 0 deletions packages/scales/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"d3-scale": "^2.1.2",
"lodash": "^4.17.4"
},
"peerDependencies": {
"prop-types": "^15.5.10"
},
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/stream/src/Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,6 @@ const Stream = ({
Stream.propTypes = StreamPropTypes

const enhancedStream = enhance(Stream)
enhancedStream.displayName = 'enhance(Stream)'
enhancedStream.displayName = 'Stream'

export default enhancedStream
2 changes: 1 addition & 1 deletion packages/sunburst/src/Sunburst.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,6 @@ const enhance = compose(
)

const enhancedSunburst = enhance(Sunburst)
enhancedSunburst.displayName = 'enhance(Sunburst)'
enhancedSunburst.displayName = 'Sunburst'

export default enhancedSunburst
5 changes: 4 additions & 1 deletion packages/treemap/src/TreeMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,7 @@ const TreeMap = ({
TreeMap.propTypes = TreeMapPropTypes
TreeMap.displayName = 'TreeMap'

export default enhance(TreeMap)
const enhancedTreeMap = enhance(TreeMap)
enhancedTreeMap.displayName = 'TreeMap'

export default enhancedTreeMap
7 changes: 5 additions & 2 deletions packages/treemap/src/TreeMapCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React, { Component } from 'react'
import { degreesToRadians } from '@nivo/core'
import { getRelativeCursor, isCursorInRect } from '@nivo/core'
import { Container } from '@nivo/core'
import { TreeMapCanvasPropTypes } from './props'
import { TreeMapCanvasPropTypes, TreeMapHtmlPropTypes } from './props'
import enhance from './enhance'
import TreeMapNodeTooltip from './TreeMapNodeTooltip'

Expand Down Expand Up @@ -152,4 +152,7 @@ class TreeMapCanvas extends Component {
TreeMapCanvas.propTypes = TreeMapCanvasPropTypes
TreeMapCanvas.displayName = 'TreeMapCanvas'

export default enhance(TreeMapCanvas)
const enhancedTreeMapCanvas = enhance(TreeMapCanvas)
enhancedTreeMapCanvas.displayName = 'TreeMapCanvas'

export default enhancedTreeMapCanvas
5 changes: 4 additions & 1 deletion packages/treemap/src/TreeMapHtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,7 @@ const TreeMapHtml = ({
TreeMapHtml.propTypes = TreeMapHtmlPropTypes
TreeMapHtml.displayName = 'TreeMapHtml'

export default enhance(TreeMapHtml)
const enhancedTreeMapHtml = enhance(TreeMapHtml)
enhancedTreeMapHtml.displayName = 'TreeMapHtml'

export default enhancedTreeMapHtml

0 comments on commit 84aa832

Please sign in to comment.