Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE: Update components #319

Merged
merged 233 commits into from
Nov 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
233 commits
Select commit Hold shift + click to select a range
5596d9f
chore: change some font size
im36-123 Aug 6, 2019
a60ab19
BREAKING CHANGE: Enabled to use react-icons
im36-123 Aug 6, 2019
aa2cc5e
chore: update snapshots to pass test
im36-123 Aug 7, 2019
8b4a053
feat: add AppNavi component
ouji-miyahara Aug 7, 2019
095f709
fix: fix for jslint
ouji-miyahara Aug 8, 2019
bc9b7ed
Merge branch 'features/ttmz' of github.com:kufu/smarthr-ui into featu…
im36-123 Aug 8, 2019
3c4aae2
Merge remote-tracking branch 'upstream/features/ttmz' into theme-size
im36-123 Aug 8, 2019
bfe9a93
Merge branch 'features/ttmz' of github.com:kufu/smarthr-ui into add_P…
ouji-miyahara Aug 8, 2019
bebf0a0
chore: update key name to constant case
im36-123 Aug 8, 2019
b4c8fe6
chore: update snapshots
im36-123 Aug 8, 2019
19a532d
BREAKING CHANGE: Changed color name of theme (#245)
im36-123 Aug 9, 2019
34c2f72
feat: export defaultPalette
im36-123 Aug 9, 2019
c95707a
feat: export default hover interaction
im36-123 Aug 9, 2019
4e1340d
feat: export default frame
im36-123 Aug 9, 2019
4427243
Merge remote-tracking branch 'upstream/features/ttmz' into theme-size
im36-123 Aug 9, 2019
4ff65d8
Merge branch 'theme-size' into export-theme
im36-123 Aug 9, 2019
1556da1
feat: export default size
im36-123 Aug 9, 2019
bc28692
chore: fix for review
ouji-miyahara Aug 13, 2019
9505ccb
chore: merged with feature branch
ouji-miyahara Aug 13, 2019
f0185e1
chore: fix style
ouji-miyahara Aug 13, 2019
3cf96f3
chore: update Tag snapshot
ouji-miyahara Aug 13, 2019
08e289c
chore: fix Tag props & styles
ouji-miyahara Aug 14, 2019
9e1df5a
chore: update snapshots
ouji-miyahara Aug 14, 2019
d6f69b9
chore: rename Border to Frame
im36-123 Aug 15, 2019
057dfa8
chore: remove duplicated property
im36-123 Aug 15, 2019
0f968ba
style: refactor
im36-123 Aug 15, 2019
b578afa
Merge pull request #243 from kufu/theme-size
nabeliwo Aug 19, 2019
6b819c6
Merge remote-tracking branch 'upstream/features/ttmz' into export-theme
im36-123 Aug 19, 2019
735808c
Merge pull request #272 from kufu/export-theme
nabeliwo Aug 19, 2019
805c9fb
Merge branch 'master' into features/ttmz
nabeliwo Aug 19, 2019
b5dc500
chore: merged with features/ttmz
ouji-miyahara Aug 19, 2019
7a513fc
chore: merged with origin
ouji-miyahara Aug 19, 2019
5f500bd
chore: update snapshot
ouji-miyahara Aug 19, 2019
80aafa4
BREAKING CHANGE: merged with upstream and change Tag style
ouji-miyahara Aug 19, 2019
ebdd4ba
wip
ouji-miyahara Aug 21, 2019
e3257e3
Merge pull request #256 from ouji-miyahara/fix_tag_style
ouji-miyahara Aug 22, 2019
1795db1
merged with feature branch
ouji-miyahara Aug 22, 2019
f721804
Merge pull request #244 from ouji-miyahara/add_PlusAppNavi
ouji-miyahara Aug 22, 2019
b79ec60
add Heading and HeadlineArea components
ouji-miyahara Aug 22, 2019
1ec3115
feat: Added Table component (#269)
im36-123 Aug 26, 2019
71e37d2
fix: style
im36-123 Aug 27, 2019
f8b27c3
Merge pull request #296 from kufu/fix-style-table
im36-123 Aug 27, 2019
6869db5
fix for review
ouji-miyahara Aug 30, 2019
66ef42a
fix: Remove the part that was described in double
nabeliwo Sep 2, 2019
bc5ee1c
fix: Use fa-check instead of check
nabeliwo Sep 2, 2019
fafb006
fix: Use fa-times instead of cross
nabeliwo Sep 2, 2019
d5e560e
fix: Use fa-check-circle instead of check-circle
nabeliwo Sep 2, 2019
dd9be98
fix: Use fa-exclamation-triangle instead of exclamation-triangle
nabeliwo Sep 2, 2019
02feebd
test: Update snapshot
nabeliwo Sep 2, 2019
f8074d1
Merge pull request #307 from kufu/fix-icon
nabeliwo Sep 3, 2019
6cd2390
feat: Add PrimaryButton component (#297)
im36-123 Sep 3, 2019
7dce43f
feat: add BaseButton component
im36-123 Sep 3, 2019
e17e53e
chore: refactoring
im36-123 Sep 3, 2019
1ced44f
feat: Add DangerButton component
im36-123 Sep 3, 2019
6f19e51
feat: add BlankImage component
ouji-miyahara Sep 3, 2019
deb9a57
chore: add role & aria-label property
ouji-miyahara Sep 3, 2019
6909756
feat: add SecondaryButton component
im36-123 Sep 3, 2019
d187ed6
chore: remove Button componentBREAKING CHANGE: Button component is no…
im36-123 Sep 3, 2019
2bff0d2
chore: add readme
im36-123 Sep 3, 2019
50500c8
feat: add SkeletonButton component
im36-123 Sep 3, 2019
a2ea350
fix; export SkeletonButton component
im36-123 Sep 3, 2019
fa05e7d
Merge pull request #284 from ouji-miyahara/add_HeadlineArea
nabeliwo Sep 3, 2019
6305033
stype: refactoring
im36-123 Sep 3, 2019
addf1d4
style: refactoring
im36-123 Sep 3, 2019
c2e4d70
chore: add className props
ouji-miyahara Sep 3, 2019
265aabf
chore: change directory name
ouji-miyahara Sep 3, 2019
7e8ccab
chore: merge with feature branch
ouji-miyahara Sep 3, 2019
1424de1
Merge pull request #309 from kufu/secondary-danger
nabeliwo Sep 4, 2019
cee9342
Merge pull request #308 from ouji-miyahara/add_BlankImage
nabeliwo Sep 6, 2019
4afe1ff
feat: Add TabBar (#301)
im36-123 Sep 9, 2019
0d9a982
Merge branch 'master' into features/ttmz
nabeliwo Sep 9, 2019
cd3ed2e
fix: Fix font-size
nabeliwo Sep 9, 2019
7a5799d
test: update jest
nabeliwo Sep 9, 2019
6bc7da8
Merge pull request #317 from kufu/fix-headline-area
nabeliwo Sep 9, 2019
744b96c
Merge branch 'master' into features/ttmz
nabeliwo Sep 10, 2019
e29f663
fix: Change label props to children
nabeliwo Sep 10, 2019
2fa502c
docs: Update README.md for TabItem
nabeliwo Sep 10, 2019
b49bdbf
test: Add TabBar test
nabeliwo Sep 10, 2019
844ccdf
lint: fix lint error
nabeliwo Sep 10, 2019
629e552
fix: Change prop type for TabItem
nabeliwo Sep 10, 2019
607b28c
Merge pull request #318 from kufu/fix-tab-item
nabeliwo Sep 10, 2019
ec594da
style: Update TableCell style
nabeliwo Sep 11, 2019
15f5e4c
Merge pull request #320 from kufu/update-table-style
nabeliwo Sep 11, 2019
ea992e4
feat: Add angle icon
nabeliwo Sep 11, 2019
d6efd59
Merge pull request #321 from kufu/add-icons
nabeliwo Sep 11, 2019
78f41d4
style: Change tag that gives 'background-color' to th
nabeliwo Sep 12, 2019
4a2c2b7
Merge pull request #322 from kufu/update-table
nabeliwo Sep 12, 2019
a610b1b
Merge branch 'master' into features/ttmz
nabeliwo Sep 17, 2019
4b4f0fd
fix: Change tag to which className is applied
nabeliwo Sep 17, 2019
2c7cc94
feat: Add className props to CheckboxLabel
nabeliwo Sep 17, 2019
37da6b4
feat: Add className props to components
nabeliwo Sep 17, 2019
03087ec
test: Update snapshot
nabeliwo Sep 17, 2019
608c4c1
Merge pull request #333 from kufu/fix-component-props
nabeliwo Sep 17, 2019
28f240e
feat(icon): Add external link icon
Sep 17, 2019
660d43d
Merge pull request #334 from kufu/add-external-link-icon
cidermitaina Sep 18, 2019
866bd38
Merge branch 'master' into features/ttmz
nabeliwo Sep 19, 2019
d0908a9
Merge branch 'features/ttmz' of github.com:kufu/smarthr-ui into featu…
nabeliwo Sep 19, 2019
a1aab3d
style: Add hover color to Checkbox
nabeliwo Sep 19, 2019
9d5fb34
refactor: Use Hooks API
nabeliwo Sep 19, 2019
8dba673
feat: Add minus icon
nabeliwo Sep 19, 2019
08741a1
feat: Add mixed props to Checkbox
nabeliwo Sep 20, 2019
d270b5a
chore: Fix typo
nabeliwo Sep 20, 2019
e13a497
test: Change test file name
nabeliwo Sep 20, 2019
351cc93
refactor: Refactor CheckboxLabel
nabeliwo Sep 20, 2019
fa1bc7b
test: Add test
nabeliwo Sep 20, 2019
009791e
docs: Add README
nabeliwo Sep 20, 2019
186946e
Merge pull request #337 from kufu/add-mixed-to-checkbox
nabeliwo Sep 25, 2019
4720536
feat: Add FaExclamationCircle icon
nabeliwo Sep 27, 2019
1c0d6cb
Merge pull request #345 from kufu/add-icon
nabeliwo Sep 30, 2019
b78d0f2
merged from features/ttmz
Oct 2, 2019
60908c5
add SecondaryButton
Oct 2, 2019
c70228b
add SecondaryButton
ouji-miyahara Oct 2, 2019
f828ead
Merge branch 'fix_FlashMessage_style' of github.com:ouji-miyahara/sma…
ouji-miyahara Oct 2, 2019
323297e
change branch for iconName & iconColor
ouji-miyahara Oct 2, 2019
2f4ceee
fix for test
ouji-miyahara Oct 2, 2019
16e250c
chore: Update styled-components as peerDependencies
nabeliwo Oct 4, 2019
7e220ac
chore: Add @types/react-dom
nabeliwo Oct 4, 2019
c59239e
feat: Add NewDropdown component temporary
nabeliwo Oct 4, 2019
f91e471
feat(select): Create select component
Sep 30, 2019
ae5cae6
fix(select): Change from text to default
Oct 4, 2019
1183721
feat: Adjust the display position of content
nabeliwo Oct 4, 2019
ec5c016
style: Adjust the style
nabeliwo Oct 4, 2019
daf3a8b
BREAKING CHANGE: replace dropdown to new dropdown
nabeliwo Oct 4, 2019
1b96936
fix: Make storybook compatible with React hooks
nabeliwo Oct 4, 2019
e7748e3
feat: Add FaCaretUp icon
nabeliwo Oct 4, 2019
9e2fceb
style: Do not display until mounted
nabeliwo Oct 4, 2019
663d081
docs: Add storybook
nabeliwo Oct 4, 2019
fb4de25
docs: Add README for Dropdown
nabeliwo Oct 4, 2019
e8bf397
fix: change for reviews
ouji-miyahara Oct 7, 2019
b3af02d
fix: Modify left position logic
nabeliwo Oct 7, 2019
23d876e
update: change CloseButton construction
ouji-miyahara Oct 7, 2019
9e27a39
Merge pull request #357 from kufu/controllable-dropdown
nabeliwo Oct 7, 2019
ba72ef1
Merge branch 'master' into features/ttmz
nabeliwo Oct 7, 2019
936f25b
fix: Fix yarn.lock
nabeliwo Oct 7, 2019
ccd75a0
fix: Fix yarn.lock
nabeliwo Oct 7, 2019
cce0fef
Merge branch 'features/ttmz' of github.com:kufu/smarthr-ui into fix_F…
ouji-miyahara Oct 7, 2019
44090a2
Merge pull request #281 from ouji-miyahara/fix_FlashMessage_style
ouji-miyahara Oct 7, 2019
93c067d
feat: update UI for Pagination component and add `withoutNumbers props`
Oct 8, 2019
121fbcc
style: update css and classNames
Oct 8, 2019
24e76c7
style: delete unnecessary style
Oct 8, 2019
54720de
style: apply styles using functions provided by theme
Oct 9, 2019
6646784
refactor: add newly added Icos to Storybook and fixed their order
Oct 9, 2019
d9405b6
refactor: give Icon's color and font-size as Icon props instead of using
Oct 9, 2019
f30d3d1
style: delete unnecessary style
Oct 9, 2019
fbcb298
refator: merge PrevPaginationItem and NextPaginationItem into a single
Oct 9, 2019
02656d9
test: update snapshots
Oct 9, 2019
925eaf7
Merge pull request #366 from kufu/features/upgdate_pagination
nabeliwo Oct 9, 2019
9e7ce93
style: Fix z-index
nabeliwo Oct 10, 2019
4c5d27d
Merge pull request #367 from kufu/fix-dropdown-z-index
nabeliwo Oct 10, 2019
a62b623
feat: add reply icon and paper-plain icon
Oct 10, 2019
eabe203
feat: update AppNavi component so it can take a child component
Oct 10, 2019
83c6f5c
refactor: delete closing tag in AppNavi's storybook
Oct 10, 2019
83738ae
fix(selectbox): Adjustment when disabled or hover and fix css
Oct 10, 2019
477a51c
Merge pull request #368 from kufu/features/update_appnavi
nabeliwo Oct 10, 2019
ca95f47
fix(selectbox): Change to use fa-sort
Oct 10, 2019
6d7bc5d
fix(selectbox): Remove blackOption and placeholder
Oct 10, 2019
4850691
feat: add clone icon
Oct 10, 2019
8a7a0ab
fix(selectbox): Add aria-label
Oct 10, 2019
f26c0ed
fix(selectbox): Remove unnecessary Vendor Prefix
Oct 11, 2019
8a2a8a2
fix: Add ThemeProvider to DropdownContent
nabeliwo Oct 11, 2019
ecc3e70
refactor: delete unnecessary style propery for Button component
Tokky0425 Oct 11, 2019
d8776de
Merge pull request #356 from cidermitaina/add-select-component
cidermitaina Oct 15, 2019
5c4e8bd
feat(icon): Add a FaCloudDownloadAlt icon
meganemura Oct 15, 2019
1530772
Merge pull request #372 from kufu/fix-dropdown-theme
nabeliwo Oct 16, 2019
56b8079
fix: add background-color to Flash component
ouji-miyahara Oct 16, 2019
86b05c7
Merge pull request #385 from ouji-miyahara/fix_Flash_bgcolor
ouji-miyahara Oct 16, 2019
de666a9
Merge pull request #381 from meganemura/icon-cloud-download
meganemura Oct 17, 2019
957a0b6
fix: Use ReactDOM.createElement instead of ReactDOM.render
nabeliwo Oct 17, 2019
d8a85e0
refactor: Remove unnecessary code
nabeliwo Oct 17, 2019
759d49e
docs: Update README
nabeliwo Oct 17, 2019
3d37129
refactor: make Dropdown components simple
koba04 Oct 17, 2019
03f632f
fix: Remove export
nabeliwo Oct 17, 2019
8f5c93c
Merge pull request #390 from kufu/fix-dropdown-bug
nabeliwo Oct 17, 2019
f55c9bb
fix: support uncontrollable Dropdown
koba04 Oct 17, 2019
967c97f
Merge branch 'features/ttmz' into refactor-dropdown
koba04 Oct 17, 2019
a3be606
Merge pull request #391 from kufu/refactor-dropdown
nabeliwo Oct 18, 2019
a6102fe
refactor: do not expose about Portal to outside the Dropdown
koba04 Oct 18, 2019
f6b0a9e
fix: Change Button interface to conform to the DOM interface
wmoai Oct 20, 2019
aa38817
fix: Change Checkbox interface to conform to the DOM interface
wmoai Oct 20, 2019
7d05e95
fix: Change Select interface to conform to the DOM interface
wmoai Oct 20, 2019
03adb5d
fix: Checkbox test
wmoai Oct 20, 2019
a7a8272
Merge pull request #395 from wmoai/fix-primitive-component-interface
wmoai-shr Oct 23, 2019
10d4e59
Merge pull request #393 from kufu/refactor-dropdown-part2
nabeliwo Oct 23, 2019
6d7a257
Revert "Merge pull request #395 from wmoai/fix-primitive-component-in…
wmoai-shr Oct 23, 2019
4458535
Merge pull request #401 from wmoai-shr/revert-primitive-component-int…
nabeliwo Oct 23, 2019
d87483d
Merge pull request #371 from kufu/features/fix_button_style
nabeliwo Oct 24, 2019
0514a7c
chore(deps-dev): Update @types/react
nabeliwo Oct 24, 2019
6b1fc21
Merge branch 'master' into features/ttmz
nabeliwo Oct 24, 2019
13eb8bf
feat(icon): Add a FaEye icon
meganemura Oct 28, 2019
48500bf
BREAKING CHANGE: Fix typo in icon name
meganemura Oct 28, 2019
c3f5322
Merge pull request #420 from kufu/icon-eye
meganemura Oct 28, 2019
66ed088
feat: Add Dialog basic component
nabeliwo Oct 28, 2019
82b6e20
feat: Create MessageDialog
nabeliwo Oct 28, 2019
c7b6f05
feat: Create ActionDialogContent
nabeliwo Oct 28, 2019
cbb77c6
feat: Update ActionDialogContent props
nabeliwo Oct 28, 2019
674cfd7
feat: Add controllable Dialog component
nabeliwo Oct 28, 2019
ee63d93
feat: Create controllable MessageDialog component
nabeliwo Oct 28, 2019
d9a6ddc
feat: Add controllable ActionDialog component
nabeliwo Oct 28, 2019
eb5815f
refactor: Standardize props
nabeliwo Oct 28, 2019
284c492
BREAKING CHANGE: Remove Modal and export Dialog
nabeliwo Oct 28, 2019
ab75876
docs: Update stories
nabeliwo Oct 29, 2019
f4bba8f
docs: Add Dialog README
nabeliwo Oct 29, 2019
0c084d9
docs: Update stories
nabeliwo Oct 29, 2019
f470ea9
fix: memoize DropdownContentRoot
koba04 Oct 29, 2019
9adfa23
Merge pull request #423 from kufu/fix-dropdown-state
nabeliwo Oct 30, 2019
3e67208
docs: Update stories
nabeliwo Oct 30, 2019
f198075
Merge branch 'features/ttmz' into create-dialog
nabeliwo Oct 30, 2019
0ec70e2
fix: Fix rendering bug
nabeliwo Oct 30, 2019
67c0923
Merge pull request #421 from kufu/fix-typo
meganemura Oct 30, 2019
df50ca9
fix: Update dropdown position logic
nabeliwo Oct 30, 2019
5d96292
fix: Fix dropdown content size bug
nabeliwo Oct 30, 2019
f871699
refactor: Position -> ContentBoxStyle
nabeliwo Oct 30, 2019
38281e9
Merge pull request #422 from kufu/create-dialog
nabeliwo Oct 31, 2019
551332d
BREAKING CHANGE: Change Flash component name to FlashMessage
nabeliwo Oct 31, 2019
38f88a7
BREAKING CHANGE: Change Chackbox component name to ChackBox
nabeliwo Oct 31, 2019
37ccba7
BREAKING CHANGE: Change Tag component name to StatusLabel
nabeliwo Oct 31, 2019
2797edb
test: Update snapshot
nabeliwo Oct 31, 2019
e7465c3
fix: Fix dropdown content position
nabeliwo Oct 31, 2019
c00dc0a
Merge pull request #424 from kufu/fix-dropdown
nabeliwo Oct 31, 2019
843bec0
fix: Update ts setting
nabeliwo Oct 31, 2019
0f70685
fix: Remove unnecessary files
nabeliwo Oct 31, 2019
e6d9c60
fix: Recover lost files
nabeliwo Oct 31, 2019
40d6ae3
Merge pull request #425 from kufu/change-component-name
nabeliwo Oct 31, 2019
82003a2
fix: Change Button interface to conform to the DOM interface
wmoai Oct 20, 2019
0ff3f35
fix: Change Select interface to conform to the DOM interface
wmoai Oct 20, 2019
6567c2d
fix: Change Select interface to conform to the DOM interface
nabeliwo Oct 31, 2019
f01952f
fix: Change Input interface to conform to the DOM interface
wmoai Oct 17, 2019
7916091
fix: Apply Input in Field Component
wmoai Oct 17, 2019
8b0b84d
fix: apply in DropDown storybook
wmoai Oct 31, 2019
38bc077
Merge pull request #426 from kufu/fix-primitive-component-interface
nabeliwo Oct 31, 2019
49ef9d7
feat: Change Field component props
nabeliwo Nov 1, 2019
5f360b9
Merge pull request #392 from wmoai/fix-input-interface
nabeliwo Nov 1, 2019
455f3ce
Merge branch 'master' into features/ttmz
nabeliwo Nov 1, 2019
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
2 changes: 1 addition & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ addParameters({ viewport: { viewports: INITIAL_VIEWPORTS } })

addDecorator(withA11y)
addDecorator(addReadme)
addDecorator(storyFn => <ThemeProvider theme={createTheme()}>{storyFn()}</ThemeProvider>)
addDecorator(Story => <ThemeProvider theme={createTheme()}><Story /></ThemeProvider>)

configure(loadStories, module)

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dependencies": {
"lodash.merge": "^4.6.1",
"lodash.range": "^3.2.0",
"polished": "^3.4.1"
"polished": "^3.4.1",
"react-icons": "^3.7.0"
},
"devDependencies": {
"@babel/core": "^7.2.2",
Expand All @@ -19,10 +20,11 @@
"@storybook/theming": "^5.2.5",
"@types/enzyme": "^3.10.1",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/jest": "^24.0.12",
"@types/jest": "^24.0.18",
"@types/lodash.merge": "^4.6.4",
"@types/lodash.range": "^3.2.5",
"@types/react": "^16.8.16",
"@types/react-dom": "^16.9.1",
"@types/react-test-renderer": "^16.8.1",
"@types/storybook__react": "^4.0.2",
"@types/styled-components": "^4.1.19",
Expand All @@ -34,7 +36,7 @@
"eslint-config-smarthr": "^2.0.0",
"fixpack": "^2.3.1",
"husky": "^3.0.0",
"jest": "^24.1.0",
"jest": "^24.9.0",
"lint-staged": "^9.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^1.17.0",
Expand All @@ -53,8 +55,8 @@
"stylelint-config-prettier": "^6.0.0",
"stylelint-config-standard": "^19.0.0",
"stylelint-config-styled-components": "^0.1.1",
"ts-jest": "^24.0.2",
"stylelint-processor-styled-components": "^1.8.0",
"ts-jest": "^24.0.0",
"ts-loader": "^6.0.0",
"typescript": "^3.2.4"
},
Expand Down
14 changes: 7 additions & 7 deletions src/components/AppBar/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const AppBarComponent: React.FC<MergedComponentProps> = ({ ...props }) => <Wrapp

export const AppBar = withTheme(AppBarComponent)

const getSpaceSize = (size: Size): 'xs' | 's' | 'm' => {
const getSpaceSize = (size: Size): 'XS' | 'S' | 'M' => {
const spaceMap: any = {
s: 'xs',
m: 's',
l: 'm',
s: 'XS',
m: 'S',
l: 'M',
}
return spaceMap[size]
}
Expand All @@ -28,13 +28,13 @@ const Wrapper = styled.div`

return css`
padding: ${pcPadding};
background: ${palette.Main};
background: ${palette.MAIN};

@media screen and (max-width: ${size.mediaQuery.tablet}px) {
@media screen and (max-width: ${size.mediaQuery.TABLET}px) {
padding: ${tabletPadding};
}

@media screen and (max-width: ${size.mediaQuery.sp}px) {
@media screen and (max-width: ${size.mediaQuery.SP}px) {
padding: ${spPadding};
}
`
Expand Down
156 changes: 78 additions & 78 deletions src/components/AppBar/__snapshots__/AppBar.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,41 +26,41 @@ exports[`AppBar should be match snapshot 1`] = `
},
},
"palette": Object {
"Background": "#f5f6fa",
"Border": "#d6d6d6",
"Column": "#f9f9f9",
"Danger": "#ef475b",
"Main": "#00a5ab",
"Outline": "rgba(0,165,171,0.5)",
"Overlay": "rgba(0,0,0,0.15)",
"Scrim": "rgba(0,0,0,0.5)",
"TextBlack": "#333",
"TextGrey": "#767676",
"Warning": "#ff8800",
"BACKGROUND": "#f5f6fa",
"BORDER": "#d6d6d6",
"COLUMN": "#f9f9f9",
"DANGER": "#ef475b",
"MAIN": "#00a5ab",
"OUTLINE": "rgba(0,165,171,0.5)",
"OVERLAY": "rgba(0,0,0,0.15)",
"SCRIM": "rgba(0,0,0,0.5)",
"TEXT_BLACK": "#333",
"TEXT_DISABLED": "#c1c1c1",
"TEXT_GREY": "#767676",
"WARNING": "#ff8800",
"disableColor": [Function],
"hoverColor": [Function],
},
"size": Object {
"font": Object {
"grande": 16,
"short": 13,
"tall": 14,
"tasting": 12,
"trenta": 22,
"venti": 20,
"GRANDE": 18,
"SHORT": 11,
"TALL": 14,
"VENTI": 24,
},
"mediaQuery": Object {
"sp": 599,
"tablet": 959,
"SP": 599,
"TABLET": 959,
},
"pxToRem": [Function],
"space": Object {
"l": 40,
"m": 32,
"s": 24,
"xl": 48,
"xs": 16,
"xxl": 56,
"xxs": 8,
"L": 40,
"M": 32,
"S": 24,
"XL": 48,
"XS": 16,
"XXL": 56,
"XXS": 8,
},
},
}
Expand Down Expand Up @@ -90,41 +90,41 @@ exports[`AppBar should be match snapshot 1`] = `
},
},
"palette": Object {
"Background": "#f5f6fa",
"Border": "#d6d6d6",
"Column": "#f9f9f9",
"Danger": "#ef475b",
"Main": "#00a5ab",
"Outline": "rgba(0,165,171,0.5)",
"Overlay": "rgba(0,0,0,0.15)",
"Scrim": "rgba(0,0,0,0.5)",
"TextBlack": "#333",
"TextGrey": "#767676",
"Warning": "#ff8800",
"BACKGROUND": "#f5f6fa",
"BORDER": "#d6d6d6",
"COLUMN": "#f9f9f9",
"DANGER": "#ef475b",
"MAIN": "#00a5ab",
"OUTLINE": "rgba(0,165,171,0.5)",
"OVERLAY": "rgba(0,0,0,0.15)",
"SCRIM": "rgba(0,0,0,0.5)",
"TEXT_BLACK": "#333",
"TEXT_DISABLED": "#c1c1c1",
"TEXT_GREY": "#767676",
"WARNING": "#ff8800",
"disableColor": [Function],
"hoverColor": [Function],
},
"size": Object {
"font": Object {
"grande": 16,
"short": 13,
"tall": 14,
"tasting": 12,
"trenta": 22,
"venti": 20,
"GRANDE": 18,
"SHORT": 11,
"TALL": 14,
"VENTI": 24,
},
"mediaQuery": Object {
"sp": 599,
"tablet": 959,
"SP": 599,
"TABLET": 959,
},
"pxToRem": [Function],
"space": Object {
"l": 40,
"m": 32,
"s": 24,
"xl": 48,
"xs": 16,
"xxl": 56,
"xxs": 8,
"L": 40,
"M": 32,
"S": 24,
"XL": 48,
"XS": 16,
"XXL": 56,
"XXS": 8,
},
},
}
Expand Down Expand Up @@ -182,41 +182,41 @@ exports[`AppBar should be match snapshot 1`] = `
},
},
"palette": Object {
"Background": "#f5f6fa",
"Border": "#d6d6d6",
"Column": "#f9f9f9",
"Danger": "#ef475b",
"Main": "#00a5ab",
"Outline": "rgba(0,165,171,0.5)",
"Overlay": "rgba(0,0,0,0.15)",
"Scrim": "rgba(0,0,0,0.5)",
"TextBlack": "#333",
"TextGrey": "#767676",
"Warning": "#ff8800",
"BACKGROUND": "#f5f6fa",
"BORDER": "#d6d6d6",
"COLUMN": "#f9f9f9",
"DANGER": "#ef475b",
"MAIN": "#00a5ab",
"OUTLINE": "rgba(0,165,171,0.5)",
"OVERLAY": "rgba(0,0,0,0.15)",
"SCRIM": "rgba(0,0,0,0.5)",
"TEXT_BLACK": "#333",
"TEXT_DISABLED": "#c1c1c1",
"TEXT_GREY": "#767676",
"WARNING": "#ff8800",
"disableColor": [Function],
"hoverColor": [Function],
},
"size": Object {
"font": Object {
"grande": 16,
"short": 13,
"tall": 14,
"tasting": 12,
"trenta": 22,
"venti": 20,
"GRANDE": 18,
"SHORT": 11,
"TALL": 14,
"VENTI": 24,
},
"mediaQuery": Object {
"sp": 599,
"tablet": 959,
"SP": 599,
"TABLET": 959,
},
"pxToRem": [Function],
"space": Object {
"l": 40,
"m": 32,
"s": 24,
"xl": 48,
"xs": 16,
"xxl": 56,
"xxs": 8,
"L": 40,
"M": 32,
"S": 24,
"XL": 48,
"XS": 16,
"XXL": 56,
"XXS": 8,
},
},
}
Expand Down
52 changes: 52 additions & 0 deletions src/components/AppNavi/AppNavi.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { action } from '@storybook/addon-actions'
import { storiesOf } from '@storybook/react'
import * as React from 'react'
import styled from 'styled-components'

import { AppNavi } from './AppNavi'

const buttons = [
{
children: 'ボタン1',
icon: 'fa-file' as const,
current: true,
},
{
children: 'ボタン2',
icon: 'fa-user-alt' as const,
onClick: action('click!!'),
},
{
children: 'ボタン3',
icon: 'fa-cog' as const,
onClick: action('click!!'),
},
]

storiesOf('AppNavi', module).add('all', () => (
<React.Fragment>
<Wrapper>
<Description>No child component</Description>
<AppNavi label="プラスメニュー" buttons={buttons} />
</Wrapper>
<Wrapper>
<Description>With a child component</Description>
<AppNavi label="プラスメニュー" buttons={buttons}>
<ChildComponent>Some child component</ChildComponent>
</AppNavi>
</Wrapper>
</React.Fragment>
))

const Wrapper = styled.div`
padding-top: 16px;
`

const Description = styled.p`
margin-bottom: 8px;
padding: 0 20px;
`

const ChildComponent = styled.p`
margin: 0 0 0 auto;
`
Loading