Skip to content

Commit

Permalink
feat(bar): typescript - uses string unions to define BarLayerType (#1322
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MarioDeSousa authored and plouc committed Dec 3, 2020
1 parent 952ad50 commit a1e08f5
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/bar/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,7 @@ declare module '@nivo/bar' {
markers: CartesianMarkerProps[]
}>

export enum BarLayerType {
Grid = 'grid',
Axes = 'axes',
Bars = 'bars',
Markers = 'markers',
Legends = 'legends',
}
export type BarLayerType = 'grid' | 'axes' | 'bars' | 'markers' | 'legends'
export type BarCustomLayer = (props: any) => React.ReactNode
export type Layer = BarLayerType | BarCustomLayer

Expand Down

0 comments on commit a1e08f5

Please sign in to comment.