Skip to content

Instantly share code, notes, and snippets.

@gjorgiev
Created January 26, 2021 21:47
Show Gist options
  • Save gjorgiev/eb479e443aae375b3cbd242c54a3b0f6 to your computer and use it in GitHub Desktop.
Save gjorgiev/eb479e443aae375b3cbd242c54a3b0f6 to your computer and use it in GitHub Desktop.
Keypad Component
.Keypad {
display: flex;
flex-wrap: wrap;
flex-direction: column;
height: 80%;
}
import React, {Component} from 'react';
import "./Keypad.css";
class Keypad extends Component {
render(){
return(
<div className="Keypad">
{/* We are using composition instead of inheritance.
read more: https://reactjs.org/docs/composition-vs-inheritance.html */}
{this.props.children}
</div>
);
}
}
export default Keypad;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment