Skip to content
Snippets Groups Projects
Commit 18ab4e62 authored by danieldeng2's avatar danieldeng2
Browse files

Remove initial example page

parent 63dcf66c
No related branches found
No related tags found
No related merge requests found
import React, { useState } from "react";
import { Route, Switch, Redirect } from "react-router-dom";
import ExamplePage from "components/templates/ExamplePage";
import Timeline from "components/pages/Timeline";
import ModuleOverview from "components/pages/ModuleOverview";
import Dashboard from "components/pages/Dashboard";
import Exams from "components/pages/Exams";
......@@ -82,7 +82,7 @@ const StandardView: React.FC<StandardViewProps> = ({
<Route path="/modules/:id/feedback" component={ModuleFeedback} />
<Route path="/timeline">
<ExamplePage name="Timeline" />
<Timeline/>
</Route>
<Route path="/exams/overview">
......
import React from "react";
import Dandruff from "components/molecules/Dandruff";
const Timeline: React.FC = () => {
return (
<>
<Dandruff heading="Timeline" />
</>
);
};
export default Timeline;
import React from "react";
import Button from "react-bootstrap/Button";
const ButtonsShowcase: React.FC = () => (
<div className="p-1">
<Button variant="primary" className="mr-1">
Primary
</Button>
<Button variant="secondary" className="mr-1">
Secondary
</Button>
<Button variant="success" className="mr-1">
Success
</Button>
<Button variant="warning" className="mr-1">
Warning
</Button>
<Button variant="danger" className="mr-1">
Danger
</Button>
<Button variant="info" className="mr-1">
Info
</Button>
<Button variant="light" className="mr-1">
Light
</Button>
<Button variant="dark" className="mr-1">
Dark
</Button>
<Button variant="link" className="mr-1">
Link
</Button>
</div>
);
export default ButtonsShowcase;
import React, { useState } from "react";
import Toast from "react-bootstrap/Toast";
import Button from "react-bootstrap/Button";
const ToastsShowcase: React.FC = () => {
const [show, toggleShow] = useState(false);
return (
<>
{!show && <Button onClick={() => toggleShow(true)}>Show Toast</Button>}
{/*
// @ts-ignore */}
<Toast show={show} onClose={() => toggleShow(false)}>
<Toast.Header>
<img src="holder.js/20x20?text=%20" className="rounded mr-2" alt="" />
<strong className="mr-auto">Bootstrap</strong>
<small>11 mins ago</small>
</Toast.Header>
<Toast.Body>Hello, world! This is a toast message.</Toast.Body>
</Toast>
</>
);
};
export default ToastsShowcase;
import React from "react";
import Jumbotron from "react-bootstrap/Jumbotron";
import ButtonsShowcase from "components/templates/ExamplePage/ExampleButtons";
import ToastsShowcase from "components/templates/ExamplePage/ExampleToasts";
export interface ExamplePageProps {
name: string;
}
const ExamplePage: React.FC<ExamplePageProps> = ({name} : ExamplePageProps) => {
return (
<>
<Jumbotron>
<h1 className="header">
Welcome To {name}
</h1>
</Jumbotron>
<h2>Buttons</h2>
<ButtonsShowcase />
<h2>Toasts</h2>
<ToastsShowcase />
</>
);
};
export default ExamplePage;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment