This repository has been archived by the owner on Dec 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display temp & RH in graph for each station (#127)
* Normalize actuals & model data and modify their display * Integrate storybook into the project * Display all forecast weather values in the graph * Rename to "model" and "readings" * Turn fire weather page related components to pure components
- Loading branch information
Showing
34 changed files
with
16,000 additions
and
11,962 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import '@storybook/addon-actions/register' | ||
import '@storybook/addon-knobs/register' |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { configure, addDecorator } from '@storybook/react' | ||
import { ThemeDecorator } from './decorators/ThemeDecorator' | ||
|
||
const req = require.context('../src', true, /\.stories\.tsx$/) | ||
|
||
function loadStories() { | ||
req.keys().forEach(req) | ||
} | ||
|
||
addDecorator(ThemeDecorator) | ||
|
||
configure(loadStories, module) |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react' | ||
import { ThemeProvider } from '@material-ui/core/styles' | ||
|
||
import { theme } from '../../src/app/theme' | ||
|
||
export const ThemeDecorator = storyFn => ( | ||
<ThemeProvider theme={theme}>{storyFn()}</ThemeProvider> | ||
) |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { createMuiTheme } from '@material-ui/core/styles' | ||
|
||
// Theme documentation: https://material-ui.com/customization/palette/ | ||
// Theme demo: https://material.io/resources/color/#!/?view.left=1&view.right=1&primary.color=003365&secondary.color=FBC02D | ||
// Do not export this directly for styling! theme should be accessed within makeStyles & withStyles. Use ErrorMessage.tsx as a reference | ||
export const theme = createMuiTheme({ | ||
palette: { | ||
primary: { | ||
light: '#3E5C93', | ||
main: '#003365', | ||
dark: '#000C3A' | ||
}, | ||
secondary: { | ||
light: '#FFF263', | ||
main: '#FBC02D', | ||
dark: '#C49000' | ||
}, | ||
success: { main: '#44D77A' }, | ||
error: { main: '#FF3E34' }, | ||
warning: { main: '#FE7921' }, | ||
contrastThreshold: 3, | ||
tonalOffset: 0.1 | ||
}, | ||
typography: { | ||
button: { | ||
textTransform: 'none' | ||
} | ||
}, | ||
breakpoints: { | ||
values: { | ||
xs: 0, | ||
sm: 600, | ||
md: 1080, // Default: 960 | ||
lg: 1280, | ||
xl: 1920 | ||
} | ||
} | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react' | ||
import { storiesOf } from '@storybook/react' | ||
import { action } from '@storybook/addon-actions' | ||
import { withKnobs, select } from '@storybook/addon-knobs' | ||
|
||
import { Button } from 'components' | ||
|
||
storiesOf('Button', module) | ||
.addDecorator(withKnobs) | ||
.add('collections', () => { | ||
const style = { margin: 10 } | ||
const color = select( | ||
'color', | ||
{ Primary: 'primary', Secondary: 'secondary', Default: 'default' }, | ||
'primary' | ||
) | ||
|
||
return ( | ||
<> | ||
<Button | ||
color={color} | ||
variant="contained" | ||
style={style} | ||
onClick={action('clicked')} | ||
> | ||
Button | ||
</Button> | ||
<Button color={color} variant="contained" style={style} loading> | ||
Button | ||
</Button> | ||
<Button color={color} variant="contained" style={style} disabled> | ||
Button | ||
</Button> | ||
</> | ||
) | ||
}) |
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.