From 47ff9a9cab7884024cf6595472a9fa0f04f30229 Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Sat, 9 May 2020 21:57:48 -0700 Subject: add basic root page --- frontend/src/components/App.js | 11 +++++------ frontend/src/components/Header.js | 20 ++++++++++++++++++++ frontend/src/components/PasteArea.js | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 frontend/src/components/Header.js create mode 100644 frontend/src/components/PasteArea.js (limited to 'frontend/src/components') diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js index 3614fe1..eeb3e58 100644 --- a/frontend/src/components/App.js +++ b/frontend/src/components/App.js @@ -1,13 +1,12 @@ import React from 'react'; +import Header from './Header' +import PasteArea from './PasteArea' function App() { return ( -
-
-

- Edit src/App.js and save to reload. -

-
+
+
+
); } diff --git a/frontend/src/components/Header.js b/frontend/src/components/Header.js new file mode 100644 index 0000000..1f1f99f --- /dev/null +++ b/frontend/src/components/Header.js @@ -0,0 +1,20 @@ +import React from 'react'; +import styled from 'styled-components' + +const SpacedTitle = styled.div` + margin-top: 10vh +` + +const Header = () => { + return ( + +

+ 📋  + ctrl-v +

+

pastebin but less ass.

+
+ ); +} + +export default Header; \ No newline at end of file diff --git a/frontend/src/components/PasteArea.js b/frontend/src/components/PasteArea.js new file mode 100644 index 0000000..f7c060c --- /dev/null +++ b/frontend/src/components/PasteArea.js @@ -0,0 +1,35 @@ +import React from 'react'; + +class PasteArea extends React.Component { + constructor(props) { + super(props); + this.state = { + value: '' + }; + + this.handleChange = this.handleChange.bind(this); + this.handleSubmit = this.handleSubmit.bind(this); + } + + handleChange(event) { + this.setState({ value: event.target.value }); + } + + handleSubmit(event) { + alert('paste content: ' + this.state.value); + event.preventDefault(); + } + + render() { + return ( +
+