@dtdot/lego 0.17.13 → 0.17.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,16 @@
1
1
  import React from 'react';
2
- import { useIsScreenSize } from '../../responsive/responsive';
3
- import MobileMinimalMenuPage from './mobile/_MobileMinimalMenuPage.component';
4
- import DesktopMinimalMenuPage from './desktop/_DesktopMinimalMenuPage.component';
2
+ import styled from 'styled-components';
3
+ import responsive from '../../responsive/responsive';
4
+ const MinimalMenuPageContainer = styled.div `
5
+ ${responsive.useStylesFor('tablet').andLarger(`
6
+ padding-left: 64px;
7
+ `)}
8
+
9
+ ${responsive.useStylesFor('mobile').andSmaller(`
10
+ padding-bottom: 64px;
11
+ `)}
12
+ `;
5
13
  const MinimalMenuPage = ({ children }) => {
6
- const isMobile = useIsScreenSize('mobile');
7
- if (isMobile) {
8
- return React.createElement(MobileMinimalMenuPage, null, children);
9
- }
10
- return React.createElement(DesktopMinimalMenuPage, null, children);
14
+ return React.createElement(MinimalMenuPageContainer, null, children);
11
15
  };
12
16
  export default MinimalMenuPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtdot/lego",
3
- "version": "0.17.13",
3
+ "version": "0.17.14",
4
4
  "description": "Some reusable components for building my applications",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface DesktopMinimalMenuPageProps {
3
- children: React.ReactNode;
4
- }
5
- declare const DesktopMinimalMenuPage: ({ children }: DesktopMinimalMenuPageProps) => JSX.Element;
6
- export default DesktopMinimalMenuPage;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
3
- const PageOuter = styled.div `
4
- padding-left: 64px;
5
- `;
6
- const DesktopMinimalMenuPage = ({ children }) => {
7
- return React.createElement(PageOuter, null, children);
8
- };
9
- export default DesktopMinimalMenuPage;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface MobileMinimalMenuPageProps {
3
- children: React.ReactNode;
4
- }
5
- declare const MobileMinimalMenuPage: ({ children }: MobileMinimalMenuPageProps) => JSX.Element;
6
- export default MobileMinimalMenuPage;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
3
- const PageOuter = styled.div `
4
- padding-bottom: 64px;
5
- `;
6
- const MobileMinimalMenuPage = ({ children }) => {
7
- return React.createElement(PageOuter, null, children);
8
- };
9
- export default MobileMinimalMenuPage;