Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ import React, { useState } from 'react';
import './App.css';
import ComponentList from './components/ComponentList/ComponentList';
import DemoDisplay from './demos/DemoDisplay';
import Navbar from './components/Navbar/Navbar';

function App() {
const [demo, setDemo] = useState('');

return (
<div className="App">
<Navbar />
<div className="docs">
<ComponentList setDemo={setDemo} />
<DemoDisplay demo={demo} />
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/components/ComponentList/ComponentList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import React from 'react';
import * as library from './../';

const components = ['Simple Button', 'Heading', 'Progress Bar'];

const ComponentList = (props) => {
const urlParams = new URLSearchParams(window.location.search);

Expand Down
1 change: 1 addition & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export { default as SimpleButton } from './SimpleButton/SimpleButton';
export { default as InfiniteScroll } from './InfiniteScroll/InfiniteScroll';
export { default as Tabs } from './Tabs/Tabs';
export { default as RadioButton } from './RadioButton/RadioButton';
export { default as ProgressBar } from './ProgressBar/ProgressBar';
19 changes: 2 additions & 17 deletions src/demos/DemoDisplay.jsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@

import React from 'react'
import './demodisplay.css'
import React from 'react';
import './demodisplay.css';
/*add your demo in the import statement below */
import { SimpleButtonDemo, HeadingDemo, ProgressBarDemo } from '../exports/exports'

const switchTo = (componentName) => {
switch (componentName) {
case 'Simple Button':
return <SimpleButtonDemo />
case 'Heading':
return <HeadingDemo />
case 'Progress Bar':
return <ProgressBarDemo/>
default:
return ''
}
}

const importView = (DemoComponentName) =>
React.lazy(() =>
Expand Down
2 changes: 1 addition & 1 deletion src/exports/exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
export { default as SimpleButtonDemo } from '../demos/SimpleButtonDemo';
export { default as HeadingDemo } from '../demos/HeadingDemo';
export { default as AvatarDemo } from '../demos/AvatarDemo';
export { default as ProgressBarDemo } from '../demos/ProgressBarDemo'
export { default as ProgressBarDemo } from '../demos/ProgressBarDemo';