Last active
March 20, 2021 22:40
-
-
Save mkirby/0399acf93152d5036a64bb5f41b5f0ae to your computer and use it in GitHub Desktop.
Step 2: How To Create A Semantic UI React Functional Table Component
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
//build out the table structure | |
// 1. add the header | |
// 2. add the body | |
// 3. add the footer | |
import React from "react"; | |
import scenarios from "./scenarios.json"; | |
import { Table } from "semantic-ui-react"; | |
function ScenarioTable() { | |
return ( | |
<div className="scenario__table"> | |
<Table> | |
<Table.Header> | |
{/*table title and column names */} | |
</Table.Header> | |
<Table.Body> | |
{/* table data here */} | |
</Table.Body> | |
<Table.Footer> | |
{/* table controls here */} | |
</Table.Footer> | |
</Table> | |
</div> | |
); | |
} | |
export default ScenarioTable; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment