Skip to content

Instantly share code, notes, and snippets.

View clc80's full-sized avatar

Claudia Maciel clc80

View GitHub Profile
import React, { Component } from 'react';
class Clock extends React.Component {
constructor(props) {
super(props);
const currentTime = new Date()
this.state = {
hours: currentTime.getHours(),
minutes: currentTime.getMinutes(),
import React, { Component } from 'react';
class Title extends React.Component {
render() {
return (
<div className="header">
<h2 className="title">
{this.props.title}
</h2>
</div>
@clc80
clc80 / app.css
Created May 31, 2018 04:43
basic styling for react app
.header {
background: #0e4db2;
}
h2 {
font-family: cursive;
font-size: 24px;
}
<div style={{backgroundColor: 'blue'}}>
This text will have a blue background
</div>
render() {
const color1 = {backgroundColor: 'blue'};
return (
<div style={color1}>
This text will have a blue background
</div>
);
}
import React, { Component } from 'react';
class Title extends React.Component {
render() {
return (
<div style={{backgroundColor: '#0e4db2'}}>
<h2 style={{fontFamily: 'cursive', fontSize: '24px'}}>
{this.props.title}
</h2>
</div>
import React, { Component } from 'react';
class Form extends Component {
render() {
return(
<div className="Form">
<h1>Form goes here</h1>
</div>
);
}
@clc80
clc80 / app.js
Created June 4, 2018 14:41
Blank App
import React, { Component } from 'react';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
</div>
);
@clc80
clc80 / form.js
Created June 4, 2018 14:42
blank form
import React, { Component } from 'react';
class Form extends Component {
render() {
return(
<div className="Form">
<h1>Form goes here</h1>
</div>
);
}
import React, { Component } from 'react';
import Form from './components/Form'
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.state = {
formItems: ['one', 'two', 'three']