Snippets

Shockoe Data Components Blog - React

Created by Michael Peter
.App {
  text-align: center;
}

.App-header {
  background-color: #282c34;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: calc(10px + 2vmin);
  color: white;
}
import React, { Component } from 'react';
import './App.css';
import { renderPlatformUI, LoremIpsumData } from './shared/DataComponents.js';

export default function App() {
	return <LoremIpsumData render={renderPlatformUI(LoremIpsumUI)} />;
}

class LoremIpsumUI extends Component {
	render() {
		return (
			<div className="App">
				<header className="App-header">
					<h1>WEB VERSION</h1>
					<p>{this.props.text}</p>
				</header>
			</div>
		);
	}
}

Comments (0)