diff options
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.tsx | 21 | ||||
-rw-r--r-- | src/lib/ContentSection/ContentSection.tsx | 4 | ||||
-rw-r--r-- | src/lib/SmartList/SmartList.tsx | 43 | ||||
-rw-r--r-- | src/lib/index.ts | 4 |
9 files changed, 14 insertions, 58 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 c5e1989..5ba33a0 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,16 +1,19 @@ import React, { useState, useRef } from 'react'; import ReactDOM from 'react-dom'; - -import { makeStyles, TextField, Button } from '@material-ui/core'; - +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 { @@ -18,7 +21,6 @@ interface RenderPropTypes { style: React.CSSProperties; } - const useStyles = makeStyles(theme => ({ window: { padding: theme.spacing(4), @@ -97,6 +99,12 @@ 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 + {' '} + <Link href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet"> + here + </Link> + . (some of them are yet in progress). We recommend starting with # Header. </p> <p> @@ -131,7 +139,6 @@ const App: React.FC = () => { /* eslint-disable max-len */ `## Markdown\n [Markdown file](${url}) *(...${fileName})* that you can see on the left was parsed and rendered by **BENZIN**! :rocket:`, 'Switch between tabs on the header to explore other markdown templates. :recycle: ', - 'Currently **only core features** of markdown function.', 'Templates on the left are being loaded from the [GitHub](https://github.com), though this pane is generated from plaintext. :pen:', '## How do I use this feature?', '```', 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'; |