Skip to content

Instantly share code, notes, and snippets.

@mkirby
Last active March 20, 2021 22:40
Show Gist options
  • Save mkirby/0399acf93152d5036a64bb5f41b5f0ae to your computer and use it in GitHub Desktop.
Save mkirby/0399acf93152d5036a64bb5f41b5f0ae to your computer and use it in GitHub Desktop.
Step 2: How To Create A Semantic UI React Functional Table Component
//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