added quick items and more minor stuff
This commit is contained in:
24
src/components/Quick.tsx
Normal file
24
src/components/Quick.tsx
Normal 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;
|
||||
22
src/components/QuickItem.tsx
Normal file
22
src/components/QuickItem.tsx
Normal 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;
|
||||
@@ -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>;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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
3
src/style/quick.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.quick-component {
|
||||
background-color: green;
|
||||
}
|
||||
0
src/style/quickItem.scss
Normal file
0
src/style/quickItem.scss
Normal file
Reference in New Issue
Block a user