aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-10-10 14:11:42 +0300
committerGitHub <noreply@github.com>2020-10-10 14:11:42 +0300
commit2f96d3e26f433a57af26ecf2ec34b9fec4183d71 (patch)
treea8c2b1daf5170923f9e7ccb46f098e30d51e8a08 /src
parentc33c6a521325adafb250124d2814423b3a4187b5 (diff)
parent36c0a6b3e7ac72e4e787d5def6b0cc03eae7db6c (diff)
downloadreact-benzin-2f96d3e26f433a57af26ecf2ec34b9fec4183d71.tar.gz
Merge pull request #15 from eug-vs/refactor/orientation
Revise BENZIN orientation
Diffstat (limited to 'src')
-rw-r--r--src/demo/Button/Button.tsx (renamed from src/lib/Button/Button.tsx)0
-rw-r--r--src/demo/Header/Header.tsx (renamed from src/lib/Header/Header.tsx)0
-rw-r--r--src/demo/Window/Window.tsx (renamed from src/lib/Window/Window.tsx)0
-rw-r--r--src/demo/Window/WindowSurface.tsx (renamed from src/lib/Window/WindowSurface.tsx)0
-rw-r--r--src/demo/Window/types.ts (renamed from src/lib/Window/types.ts)0
-rw-r--r--src/index.tsx10
-rw-r--r--src/lib/ContentSection/ContentSection.tsx4
-rw-r--r--src/lib/SmartList/SmartList.tsx43
-rw-r--r--src/lib/index.ts4
9 files changed, 4 insertions, 57 deletions
diff --git a/src/lib/Button/Button.tsx b/src/demo/Button/Button.tsx
index 6bc0f98..6bc0f98 100644
--- a/src/lib/Button/Button.tsx
+++ b/src/demo/Button/Button.tsx
diff --git a/src/lib/Header/Header.tsx b/src/demo/Header/Header.tsx
index 58be989..58be989 100644
--- a/src/lib/Header/Header.tsx
+++ b/src/demo/Header/Header.tsx
diff --git a/src/lib/Window/Window.tsx b/src/demo/Window/Window.tsx
index beaa672..beaa672 100644
--- a/src/lib/Window/Window.tsx
+++ b/src/demo/Window/Window.tsx
diff --git a/src/lib/Window/WindowSurface.tsx b/src/demo/Window/WindowSurface.tsx
index 1900901..1900901 100644
--- a/src/lib/Window/WindowSurface.tsx
+++ b/src/demo/Window/WindowSurface.tsx
diff --git a/src/lib/Window/types.ts b/src/demo/Window/types.ts
index 9e18fe3..9e18fe3 100644
--- a/src/lib/Window/types.ts
+++ b/src/demo/Window/types.ts
diff --git a/src/index.tsx b/src/index.tsx
index 4dd760b..5ba33a0 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,21 +1,19 @@
import React, { useState, useRef } from 'react';
import ReactDOM from 'react-dom';
-
import {
makeStyles,
TextField,
Button,
Link,
} from '@material-ui/core';
-
import {
Benzin,
- Header,
- Window,
Markdown,
ContentSection,
} from './lib';
+import Header from './demo/Header/Header';
+import Window from './demo/Window/Window';
import icon from './assets/icon.svg';
interface RenderPropTypes {
@@ -23,7 +21,6 @@ interface RenderPropTypes {
style: React.CSSProperties;
}
-
const useStyles = makeStyles(theme => ({
window: {
padding: theme.spacing(4),
@@ -102,7 +99,8 @@ const LivePreviewPage: React.FC<LivePropTypes> = ({ setLivePreviewData }) => {
<ContentSection sectionName="Markdown live preview" level={2}>
<p>
Start typing and see your text rendered on the left window!
- You can find the list of all Markdown features {' '}
+ You can find the list of all Markdown features
+ {' '}
<Link href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet">
here
</Link>
diff --git a/src/lib/ContentSection/ContentSection.tsx b/src/lib/ContentSection/ContentSection.tsx
index 28b1ad5..3432bd5 100644
--- a/src/lib/ContentSection/ContentSection.tsx
+++ b/src/lib/ContentSection/ContentSection.tsx
@@ -16,10 +16,6 @@ const useStyles = makeStyles(theme => ({
content: {
padding: theme.spacing(2, 2, 1, 3),
marginBottom: theme.spacing(1),
-
- '& .MuiButton-root': {
- margin: theme.spacing(1, 2, 2, 0),
- },
},
}));
diff --git a/src/lib/SmartList/SmartList.tsx b/src/lib/SmartList/SmartList.tsx
deleted file mode 100644
index c86c127..0000000
--- a/src/lib/SmartList/SmartList.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import React from 'react';
-import { FixedSizeList } from 'react-window';
-import AutoSizer from 'react-virtualized-auto-sizer';
-
-
-interface RenderPropTypes {
- index: number;
- style: React.CSSProperties;
-}
-
-interface PropTypes {
- itemSize: number;
- itemCount: number;
- renderItem: React.FC<RenderPropTypes>;
-}
-
-interface Size {
- height: number;
- width: number;
-}
-
-
-const SmartList: React.FC<PropTypes> = ({ itemSize, itemCount, renderItem }) => {
- const ResizedList: React.FC<Size> = ({ width, height }) => (
- <FixedSizeList
- height={height}
- width={width}
- itemSize={itemSize}
- itemCount={itemCount}
- >
- {renderItem}
- </FixedSizeList>
- );
-
- return (
- <div style={{ flex: '1 1 auto', overflow: 'hidden' }}>
- <AutoSizer children={ResizedList} />
- </div>
- );
-};
-
-
-export default SmartList;
diff --git a/src/lib/index.ts b/src/lib/index.ts
index 0f31104..545e6f8 100644
--- a/src/lib/index.ts
+++ b/src/lib/index.ts
@@ -1,7 +1,3 @@
-export { default as Window } from './Window/Window';
-export { default as Header } from './Header/Header';
export { default as ContentSection } from './ContentSection/ContentSection';
-export { default as SmartList } from './SmartList/SmartList';
export { default as Benzin } from './Benzin/Benzin';
-export { default as Button } from './Button/Button';
export { default as Markdown } from './Markdown/Markdown';