Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nos Hs2023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Språksamlingane
stadnamn
Nos Hs2023
Commits
6c268276
Commit
6c268276
authored
4 years ago
by
esikkala
Browse files
Options
Downloads
Patches
Plain Diff
Storybook: add decorator for Redux, React Router, and Material-UI. Also init translatations.
parent
8bdf7780
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.storybook/preview-head.html
+1
-0
1 addition, 0 deletions
.storybook/preview-head.html
.storybook/preview.js
+63
-0
63 additions, 0 deletions
.storybook/preview.js
with
64 additions
and
0 deletions
.storybook/preview-head.html
0 → 100644
+
1
−
0
View file @
6c268276
<link
rel=
"stylesheet"
href=
"https://fonts.googleapis.com/css?family=Roboto:300,400,500"
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.storybook/preview.js
0 → 100644
+
63
−
0
View file @
6c268276
import
{
addDecorator
}
from
'
@storybook/react
'
import
{
DocsPage
,
DocsContainer
}
from
'
@storybook/addon-docs/blocks
'
import
React
from
'
react
'
import
{
createStore
}
from
'
redux
'
import
{
Provider
}
from
'
react-redux
'
import
{
Router
}
from
'
react-router-dom
'
import
{
createBrowserHistory
}
from
'
history
'
import
intl
from
'
react-intl-universal
'
import
{
MuiThemeProvider
,
createMuiTheme
}
from
'
@material-ui/core/styles
'
import
deepPurple
from
'
@material-ui/core/colors/deepPurple
'
import
localeEN
from
'
../src/client/translations/sampo/localeEN
'
import
localeFI
from
'
../src/client/translations/sampo/localeFI
'
import
localeSV
from
'
../src/client/translations/sampo/localeSV
'
import
reducer
from
'
../src/client/reducers
'
import
'
../src/client/index.css
'
const
store
=
createStore
(
reducer
)
intl
.
init
({
currentLocale
:
'
en
'
,
locales
:
{
en
:
localeEN
,
fi
:
localeFI
,
sv
:
localeSV
}
})
const
theme
=
createMuiTheme
({
palette
:
{
primary
:
deepPurple
},
overrides
:
{
MuiTooltip
:
{
tooltip
:
{
fontSize
:
'
1 rem
'
}
},
MuiExpansionPanel
:
{
root
:
{
'
&$expanded
'
:
{
marginTop
:
8
,
marginBottom
:
8
}
}
},
MuiButton
:
{
endIcon
:
{
marginLeft
:
0
}
}
}
})
addDecorator
(
Story
=>
(
<
Provider
store
=
{
store
}
>
<
Router
history
=
{
createBrowserHistory
()}
>
<
MuiThemeProvider
theme
=
{
theme
}
>
<
Story
/>
<
/MuiThemeProvider
>
<
/Router
>
<
/Provider
>
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment