added quick items and more minor stuff

This commit is contained in:
2020-04-21 18:40:13 +02:00
parent f37e5d1fd0
commit 0fd8cc7409
7 changed files with 62 additions and 3 deletions

24
src/components/Quick.tsx Normal file
View File

@@ -0,0 +1,24 @@
import * as React from "react";
import * as PropTypes from "prop-types";
import "../style/quick.scss";
class Quick extends React.Component {
static propTypes = {
children : PropTypes.element
};
constructor(props){
super(props);
}
render(): JSX.Element {
return <div className="quick-component">
{this.props.children}
</div>;
}
}
export default Quick;

View File

@@ -0,0 +1,22 @@
import * as React from "react";
import * as PropTypes from "prop-types";
import "../style/quickItem.scss";
class QuickItem extends React.Component {
static propTypes = {
url: PropTypes.string.isRequired
};
constructor(props){
super(props);
}
render(): JSX.Element {
return <div className="quickItem-component">
</div>;
}
}
export default QuickItem;

View File

@@ -1,12 +1,19 @@
import * as React from "react";
import Quick from "./Quick";
import QuickItem from "./QuickItem";
class App extends React.Component {
constructor(props) {
super(props);
}
render(): JSX.Element {
return <h1>Hello world</h1>;
return <div>
<Quick>
<QuickItem/>
</Quick>
</div>;
}
}

View File

@@ -1,7 +1,7 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import App from "./components/app";
import App from "./components/App";
import "./style/default.scss";

3
src/style/quick.scss Normal file
View File

@@ -0,0 +1,3 @@
.quick-component {
background-color: green;
}

0
src/style/quickItem.scss Normal file
View File