Skip to content

Instantly share code, notes, and snippets.

@Suzangithub
Suzangithub / Applied Visual Design: Adjust the Color of Various Elements to Complementary Colors
Created October 15, 2018 03:17
Applied Visual Design: Adjust the Color of Various Elements to Complementary Colors
<style>
body {
background-color: white;
}
header {
background-color: #09A7A1;
color: white;
padding: 0.25em;
}
h2 {
@Suzangithub
Suzangithub / Applied Visual Design: Push Elements Left or Right with the float Property
Created October 15, 2018 02:46
Applied Visual Design: Push Elements Left or Right with the float Property
<head>
<style>
#left {
float: left;
width: 50%;
}
#right {
float: right;
width: 40%;
}
@Suzangithub
Suzangithub / Applied Visual Design: Use the text-transform Property to Make Text Uppercase
Created October 14, 2018 15:19
Applied Visual Design: Use the text-transform Property to Make Text Uppercase
<style>
h4 {
text-align: center;
background-color: rgba(45, 45, 45, 0.1);
padding: 10px;
font-size: 27px;
}
p {
text-align: justify;
@Suzangithub
Suzangithub / Applied Visual Design: Adjust the background-color Property of Text
Created October 14, 2018 15:01
Applied Visual Design: Adjust the background-color Property of Text
<style>
h4 {
text-align: center;
background-color: rgba(45, 45, 45, 0.1);
padding: 10px;
}
p {
text-align: justify;
}
.links {
@Suzangithub
Suzangithub / Applied Visual Design: Create Visual Balance Using the text-align Property
Created October 14, 2018 11:27
Applied Visual Design: Create Visual Balance Using the text-align Property
<style>
h4 {text-align: center;
}
p {text-align: justify;
}
.links {
margin-right: 20px;
@Suzangithub
Suzangithub / React: Review Using Props with Stateless Functional Components
Created October 14, 2018 11:24
React: Review Using Props with Stateless Functional Components
class CampSite extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<Camper/>
</div>
);
@Suzangithub
Suzangithub / React: Access Props Using this.props
Created October 14, 2018 10:59
React: Access Props Using this.props
class ReturnTempPassword extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
{ /* change code below this line */ }
@Suzangithub
Suzangithub / React: Use PropTypes to Define the Props You Expect
Created October 14, 2018 04:22
React: Use PropTypes to Define the Props You Expect
const Items = (props) => {
return <h1>Current Quantity of Items in Cart: {props.quantity}</h1>
};
// change code below this line
Items.propTypes =
{quantity: PropTypes.number.isRequired}
;
@Suzangithub
Suzangithub / React: Override Default Props
Last active October 13, 2018 08:44
React: Override Default Props
const Items = (props) => {
return <h1>Current Quantity of Items in Cart: {props.quantity}</h1>
}
Items.defaultProps = {
quantity: 0
}
class ShoppingCart extends React.Component {
constructor(props) {
@Suzangithub
Suzangithub / React: Use Default Props
Created October 13, 2018 08:27
React: Use Default Props
const ShoppingCart = (props) => {
return (
<div>
<h1>Shopping Cart Component</h1>
</div>
)
};
// change code below this line
ShoppingCart.defaultProps = {