Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/bar/stories/bar.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ stories.add('grouped horizontal', () => (
layout="horizontal"
enableGridY={false}
enableGridX={true}
theme={{
fontSize: 28,
}}
/>
))

Expand Down Expand Up @@ -252,3 +255,5 @@ stories.add('enter/leave (check actions)', () => (
onMouseLeave={action('onMouseLeave')}
/>
))

stories.add('theme font size', () => <Bar {...commonProps} theme={{ fontSize: 23 }} />)
1 change: 1 addition & 0 deletions packages/core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ declare module '@nivo/core' {

export type Theme = Partial<{
background: string
fontSize: string | 0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually there are other props missing from this definition:

    fontFamily: string
    textColor: string

It would be great if you could add them too!

axis: Partial<{
domain: Partial<{
line: Partial<React.CSSProperties>
Expand Down
2 changes: 2 additions & 0 deletions packages/geo/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react'
import { Dimensions, Theme, Box, BoxAlign } from '@nivo/core'
import { LegendProps } from '@nivo/legends'

declare module '@nivo/geo' {
///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -116,6 +117,7 @@ declare module '@nivo/geo' {
onMouseMove?: ChoroplethEventHandler
onMouseLeave?: ChoroplethEventHandler
onClick?: ChoroplethEventHandler
legends: Array<{ dataFrom: 'indexes' | 'keys' } & LegendProps>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package doesn't support dataFrom, the type should be legends: LegendProps[]

}

export interface ChoroplethProps extends ChoroplethCommonProps {}
Expand Down