-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* adds breakpoint constants and react-breakpoints utils * add chart tooltip and base theme customized * add responsive graph height, tooltip dimensions, and font size helpers * update pf to fix theme * tests
- Loading branch information
Showing
18 changed files
with
4,402 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,34 @@ | ||
import { graphHelpers } from '../graphHelpers'; | ||
import { graphHelpers, getGraphHeight, getTooltipDimensions, getTooltipFontSize } from '../graphHelpers'; | ||
import { helpers } from '../helpers'; | ||
|
||
const { breakpoints } = helpers; | ||
|
||
describe('GraphHelpers', () => { | ||
it('should have specific functions', () => { | ||
expect(graphHelpers).toMatchSnapshot('helpers'); | ||
}); | ||
it('should match graph heights at all breakpoints', () => { | ||
expect(getGraphHeight(breakpoints, 'xs')).toMatchSnapshot('xs graph height'); | ||
expect(getGraphHeight(breakpoints, 'sm')).toMatchSnapshot('sm graph height'); | ||
expect(getGraphHeight(breakpoints, 'md')).toMatchSnapshot('md graph height'); | ||
expect(getGraphHeight(breakpoints, 'lg')).toMatchSnapshot('lg graph height'); | ||
expect(getGraphHeight(breakpoints, 'xl')).toMatchSnapshot('xl graph height'); | ||
expect(getGraphHeight(breakpoints, 'xl2')).toMatchSnapshot('xl2 graph height'); | ||
}); | ||
it('should match tooltip dimensions at all breakpoints', () => { | ||
expect(getTooltipDimensions(breakpoints, 'xs')).toMatchSnapshot('xs tooltip dimensions'); | ||
expect(getTooltipDimensions(breakpoints, 'sm')).toMatchSnapshot('sm tooltip dimensions'); | ||
expect(getTooltipDimensions(breakpoints, 'md')).toMatchSnapshot('md tooltip dimensions'); | ||
expect(getTooltipDimensions(breakpoints, 'lg')).toMatchSnapshot('lg tooltip dimensions'); | ||
expect(getTooltipDimensions(breakpoints, 'xl')).toMatchSnapshot('xl tooltip dimensions'); | ||
expect(getTooltipDimensions(breakpoints, 'xl2')).toMatchSnapshot('xl2 tooltip dimensions'); | ||
}); | ||
it('should match tooltip font sizes at all breakpoints', () => { | ||
expect(getTooltipFontSize(breakpoints, 'xs')).toMatchSnapshot('xs tooltip font sizes'); | ||
expect(getTooltipFontSize(breakpoints, 'sm')).toMatchSnapshot('sm tooltip font sizes'); | ||
expect(getTooltipFontSize(breakpoints, 'md')).toMatchSnapshot('md tooltip font sizes'); | ||
expect(getTooltipFontSize(breakpoints, 'lg')).toMatchSnapshot('lg tooltip font sizes'); | ||
expect(getTooltipFontSize(breakpoints, 'xl')).toMatchSnapshot('xl tooltip font sizes'); | ||
expect(getTooltipFontSize(breakpoints, 'xl2')).toMatchSnapshot('xl2 tooltip font sizes'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.