Skip to content

Commit

Permalink
UI and Styling Improvements (w/o Drag&Scroll) (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
natterstefan committed Jul 8, 2018
1 parent 52bc7e6 commit 45e656a
Show file tree
Hide file tree
Showing 16 changed files with 465 additions and 87 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,283 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Component/AppMenuContainer should render proper withStyles result 1`] = `
<AppMenuContainer
classes={
Object {
"appBar": "AppMenuContainer-appBar-4",
"appBarShift": "AppMenuContainer-appBarShift-5",
"appBarShift-left": "AppMenuContainer-appBarShift-left-6",
"appFrame": "AppMenuContainer-appFrame-3",
"content": "AppMenuContainer-content-12",
"content-left": "AppMenuContainer-content-left-13",
"contentShift": "AppMenuContainer-contentShift-14",
"contentShift-left": "AppMenuContainer-contentShift-left-15",
"drawer": "AppMenuContainer-drawer-9",
"drawerHeader": "AppMenuContainer-drawerHeader-11",
"drawerPaper": "AppMenuContainer-drawerPaper-10",
"flex": "AppMenuContainer-flex-2",
"hide": "AppMenuContainer-hide-8",
"menuButton": "AppMenuContainer-menuButton-7",
"root": "AppMenuContainer-root-1",
}
}
theme={
Object {
"breakpoints": Object {
"between": [Function],
"down": [Function],
"keys": Array [
"xs",
"sm",
"md",
"lg",
"xl",
],
"only": [Function],
"up": [Function],
"values": Object {
"lg": 1280,
"md": 960,
"sm": 600,
"xl": 1920,
"xs": 0,
},
"width": [Function],
},
"direction": "ltr",
"mixins": Object {
"gutters": [Function],
"toolbar": Object {
"@media (min-width:0px) and (orientation: landscape)": Object {
"minHeight": 48,
},
"@media (min-width:600px)": Object {
"minHeight": 64,
},
"minHeight": 56,
},
},
"overrides": Object {},
"palette": Object {
"action": Object {
"active": "rgba(0, 0, 0, 0.54)",
"disabled": "rgba(0, 0, 0, 0.26)",
"disabledBackground": "rgba(0, 0, 0, 0.12)",
"hover": "rgba(0, 0, 0, 0.08)",
"hoverOpacity": 0.08,
"selected": "rgba(0, 0, 0, 0.14)",
},
"augmentColor": [Function],
"background": Object {
"default": "#fafafa",
"paper": "#fff",
},
"common": Object {
"black": "#000",
"white": "#fff",
},
"contrastThreshold": 3,
"divider": "rgba(0, 0, 0, 0.12)",
"error": Object {
"contrastText": "#fff",
"dark": "#d32f2f",
"light": "#e57373",
"main": "#f44336",
},
"getContrastText": [Function],
"grey": Object {
"100": "#f5f5f5",
"200": "#eeeeee",
"300": "#e0e0e0",
"400": "#bdbdbd",
"50": "#fafafa",
"500": "#9e9e9e",
"600": "#757575",
"700": "#616161",
"800": "#424242",
"900": "#212121",
"A100": "#d5d5d5",
"A200": "#aaaaaa",
"A400": "#303030",
"A700": "#616161",
},
"primary": Object {
"contrastText": "#fff",
"dark": "#303f9f",
"light": "#7986cb",
"main": "#3f51b5",
},
"secondary": Object {
"contrastText": "#fff",
"dark": "#c51162",
"light": "#ff4081",
"main": "#f50057",
},
"text": Object {
"disabled": "rgba(0, 0, 0, 0.38)",
"hint": "rgba(0, 0, 0, 0.38)",
"primary": "rgba(0, 0, 0, 0.87)",
"secondary": "rgba(0, 0, 0, 0.54)",
},
"tonalOffset": 0.2,
"type": "light",
},
"props": Object {},
"shadows": Array [
"none",
"0px 1px 3px 0px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 2px 1px -1px rgba(0, 0, 0, 0.12)",
"0px 1px 5px 0px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 3px 1px -2px rgba(0, 0, 0, 0.12)",
"0px 1px 8px 0px rgba(0, 0, 0, 0.2),0px 3px 4px 0px rgba(0, 0, 0, 0.14),0px 3px 3px -2px rgba(0, 0, 0, 0.12)",
"0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0, 0, 0, 0.12)",
"0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 5px 8px 0px rgba(0, 0, 0, 0.14),0px 1px 14px 0px rgba(0, 0, 0, 0.12)",
"0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px 0px rgba(0, 0, 0, 0.14),0px 1px 18px 0px rgba(0, 0, 0, 0.12)",
"0px 4px 5px -2px rgba(0, 0, 0, 0.2),0px 7px 10px 1px rgba(0, 0, 0, 0.14),0px 2px 16px 1px rgba(0, 0, 0, 0.12)",
"0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0, 0, 0, 0.12)",
"0px 5px 6px -3px rgba(0, 0, 0, 0.2),0px 9px 12px 1px rgba(0, 0, 0, 0.14),0px 3px 16px 2px rgba(0, 0, 0, 0.12)",
"0px 6px 6px -3px rgba(0, 0, 0, 0.2),0px 10px 14px 1px rgba(0, 0, 0, 0.14),0px 4px 18px 3px rgba(0, 0, 0, 0.12)",
"0px 6px 7px -4px rgba(0, 0, 0, 0.2),0px 11px 15px 1px rgba(0, 0, 0, 0.14),0px 4px 20px 3px rgba(0, 0, 0, 0.12)",
"0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0, 0, 0, 0.12)",
"0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 13px 19px 2px rgba(0, 0, 0, 0.14),0px 5px 24px 4px rgba(0, 0, 0, 0.12)",
"0px 7px 9px -4px rgba(0, 0, 0, 0.2),0px 14px 21px 2px rgba(0, 0, 0, 0.14),0px 5px 26px 4px rgba(0, 0, 0, 0.12)",
"0px 8px 9px -5px rgba(0, 0, 0, 0.2),0px 15px 22px 2px rgba(0, 0, 0, 0.14),0px 6px 28px 5px rgba(0, 0, 0, 0.12)",
"0px 8px 10px -5px rgba(0, 0, 0, 0.2),0px 16px 24px 2px rgba(0, 0, 0, 0.14),0px 6px 30px 5px rgba(0, 0, 0, 0.12)",
"0px 8px 11px -5px rgba(0, 0, 0, 0.2),0px 17px 26px 2px rgba(0, 0, 0, 0.14),0px 6px 32px 5px rgba(0, 0, 0, 0.12)",
"0px 9px 11px -5px rgba(0, 0, 0, 0.2),0px 18px 28px 2px rgba(0, 0, 0, 0.14),0px 7px 34px 6px rgba(0, 0, 0, 0.12)",
"0px 9px 12px -6px rgba(0, 0, 0, 0.2),0px 19px 29px 2px rgba(0, 0, 0, 0.14),0px 7px 36px 6px rgba(0, 0, 0, 0.12)",
"0px 10px 13px -6px rgba(0, 0, 0, 0.2),0px 20px 31px 3px rgba(0, 0, 0, 0.14),0px 8px 38px 7px rgba(0, 0, 0, 0.12)",
"0px 10px 13px -6px rgba(0, 0, 0, 0.2),0px 21px 33px 3px rgba(0, 0, 0, 0.14),0px 8px 40px 7px rgba(0, 0, 0, 0.12)",
"0px 10px 14px -6px rgba(0, 0, 0, 0.2),0px 22px 35px 3px rgba(0, 0, 0, 0.14),0px 8px 42px 7px rgba(0, 0, 0, 0.12)",
"0px 11px 14px -7px rgba(0, 0, 0, 0.2),0px 23px 36px 3px rgba(0, 0, 0, 0.14),0px 9px 44px 8px rgba(0, 0, 0, 0.12)",
"0px 11px 15px -7px rgba(0, 0, 0, 0.2),0px 24px 38px 3px rgba(0, 0, 0, 0.14),0px 9px 46px 8px rgba(0, 0, 0, 0.12)",
],
"spacing": Object {
"unit": 8,
},
"transitions": Object {
"create": [Function],
"duration": Object {
"complex": 375,
"enteringScreen": 225,
"leavingScreen": 195,
"short": 250,
"shorter": 200,
"shortest": 150,
"standard": 300,
},
"easing": Object {
"easeIn": "cubic-bezier(0.4, 0, 1, 1)",
"easeInOut": "cubic-bezier(0.4, 0, 0.2, 1)",
"easeOut": "cubic-bezier(0.0, 0, 0.2, 1)",
"sharp": "cubic-bezier(0.4, 0, 0.6, 1)",
},
"getAutoHeightDuration": [Function],
},
"typography": Object {
"body1": Object {
"color": "rgba(0, 0, 0, 0.87)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "0.875rem",
"fontWeight": 400,
"lineHeight": "1.46429em",
},
"body2": Object {
"color": "rgba(0, 0, 0, 0.87)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "0.875rem",
"fontWeight": 500,
"lineHeight": "1.71429em",
},
"button": Object {
"color": "rgba(0, 0, 0, 0.87)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "0.875rem",
"fontWeight": 500,
"textTransform": "uppercase",
},
"caption": Object {
"color": "rgba(0, 0, 0, 0.54)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "0.75rem",
"fontWeight": 400,
"lineHeight": "1.375em",
},
"display1": Object {
"color": "rgba(0, 0, 0, 0.54)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "2.125rem",
"fontWeight": 400,
"lineHeight": "1.20588em",
},
"display2": Object {
"color": "rgba(0, 0, 0, 0.54)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "2.8125rem",
"fontWeight": 400,
"lineHeight": "1.06667em",
"marginLeft": "-.02em",
},
"display3": Object {
"color": "rgba(0, 0, 0, 0.54)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "3.5rem",
"fontWeight": 400,
"letterSpacing": "-.02em",
"lineHeight": "1.30357em",
"marginLeft": "-.02em",
},
"display4": Object {
"color": "rgba(0, 0, 0, 0.54)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "7rem",
"fontWeight": 300,
"letterSpacing": "-.04em",
"lineHeight": "1.14286em",
"marginLeft": "-.04em",
},
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": 14,
"fontWeightLight": 300,
"fontWeightMedium": 500,
"fontWeightRegular": 400,
"headline": Object {
"color": "rgba(0, 0, 0, 0.87)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "1.5rem",
"fontWeight": 400,
"lineHeight": "1.35417em",
},
"pxToRem": [Function],
"round": [Function],
"subheading": Object {
"color": "rgba(0, 0, 0, 0.87)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "1rem",
"fontWeight": 400,
"lineHeight": "1.5em",
},
"title": Object {
"color": "rgba(0, 0, 0, 0.87)",
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
"fontSize": "1.3125rem",
"fontWeight": 500,
"lineHeight": "1.16667em",
},
},
"zIndex": Object {
"appBar": 1100,
"drawer": 1200,
"mobileStepper": 1000,
"modal": 1300,
"snackbar": 1400,
"tooltip": 1500,
},
}
}
>
<Child />
</AppMenuContainer>
`;

exports[`Component/AppMenuContainer should render without throwing an error 1`] = `
<div
className="AppMenuContainer-root-1"
Expand Down Expand Up @@ -35,14 +313,15 @@ exports[`Component/AppMenuContainer should render without throwing an error 1`]
anchor="left"
classes={
Object {
"paper": "AppMenuContainer-drawerPaper-9",
"docked": "AppMenuContainer-drawer-9",
"paper": "AppMenuContainer-drawerPaper-10",
}
}
open={false}
variant="persistent"
>
<div
className="AppMenuContainer-drawerHeader-10"
className="AppMenuContainer-drawerHeader-11"
>
<WithStyles(IconButton)
onClick={[Function]}
Expand All @@ -54,10 +333,10 @@ exports[`Component/AppMenuContainer should render without throwing an error 1`]
<AppMenuContent />
</WithStyles(Drawer)>
<main
className="AppMenuContainer-content-11 AppMenuContainer-content-left-12"
className="AppMenuContainer-content-12 AppMenuContainer-content-left-13"
>
<div
className="AppMenuContainer-drawerHeader-10"
className="AppMenuContainer-drawerHeader-11"
/>
<Child />
</main>
Expand Down
9 changes: 9 additions & 0 deletions src/components/app-menu-container/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,13 @@ describe('Component/AppMenuContainer', () => {
expect(wrapper.dive()).toMatchSnapshot()
expect(wrapper.find(Child).length).toEqual(1)
})

test('should render proper withStyles result', () => {
const wrapper = shallow(
<AppMenuContainer>
<Child />
</AppMenuContainer>,
)
expect(wrapper).toMatchSnapshot()
})
})

0 comments on commit 45e656a

Please sign in to comment.