-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
built our first class component for the inputs container, and built a…
…n input functional component to render custom inputs
- Loading branch information
1 parent
a18ea06
commit 2697dbf
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React, { Component } from 'react'; | ||
|
||
import Input from './input'; | ||
|
||
class Card extends Component { | ||
render() { | ||
return ( | ||
<div className="card"> | ||
{ Input('Color') } | ||
{ Input('Plural Noun') } | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default Card; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
|
||
const Input = (title) => { | ||
return ( | ||
<div className="input"> | ||
<input /> | ||
<label>{title}</label> | ||
</div> | ||
) | ||
} | ||
|
||
export default Input; |