generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added seedlot dashboard page and initial grid display for it (#32)
* feat: added seedlot dashboard page and initial grid display for it * fix: seedlot dashboard url
- Loading branch information
1 parent
e152e6b
commit b38e772
Showing
18 changed files
with
179 additions
and
59 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
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
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
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
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,34 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
Column, | ||
IconButton | ||
} from '@carbon/react'; | ||
import { Favorite } from '@carbon/icons-react'; | ||
|
||
import './styles.css'; | ||
|
||
interface PageTitleProps { | ||
title: string; | ||
subtitle: string; | ||
favorite?: boolean; | ||
} | ||
|
||
// TODO: Toggle Favorite logic | ||
const PageTitle = ({ title, subtitle, favorite }: PageTitleProps) => ( | ||
<Column sm={4} md={4} className="title-section"> | ||
<div className={favorite ? 'title-favorite' : ''}> | ||
<h1>{title}</h1> | ||
{favorite && ( | ||
<IconButton kind="ghost" label="Favorite" align="right"> | ||
<Favorite size={28} /> | ||
</IconButton> | ||
)} | ||
</div> | ||
<h4> | ||
{subtitle} | ||
</h4> | ||
</Column> | ||
); | ||
|
||
export default PageTitle; |
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,33 @@ | ||
.title-section { | ||
padding-left: 3.5rem; | ||
} | ||
|
||
.title-favorite { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.title-favorite button{ | ||
margin-left: 0.5rem; | ||
padding-bottom: 0.5rem; | ||
} | ||
|
||
.title-favorite button svg{ | ||
margin-bottom: 0.1875rem; | ||
} | ||
|
||
@media only screen and (max-width: 1584px) { | ||
.title-section { | ||
padding-left: 3rem; | ||
} | ||
} | ||
|
||
@media only screen and (max-width: 672px) { | ||
.title-section { | ||
padding-left: 2rem; | ||
} | ||
|
||
.title-section h4 { | ||
width: 90vw; | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.title-section { | ||
.right-title-section { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
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
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 was deleted.
Oops, something went wrong.
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,54 @@ | ||
import React from 'react'; | ||
import { | ||
FlexGrid, | ||
Row, | ||
Column, | ||
Stack | ||
} from '@carbon/react'; | ||
|
||
import PageTitle from '../../components/PageTitle'; | ||
|
||
import './styles.css'; | ||
|
||
const SeedlotDashboard = () => ( | ||
<FlexGrid className="seedlot-page"> | ||
<Stack gap={7}> | ||
<Row> | ||
<PageTitle | ||
title="Seedlots" | ||
subtitle="Register and manage your seedlots" | ||
favorite | ||
/> | ||
</Row> | ||
<Row className="seedlot-dashboard-content"> | ||
<Column sm={4} md={4} lg={4}> | ||
<span> | ||
Card Placeholder | ||
</span> | ||
</Column> | ||
<Column sm={4} md={4} lg={4}> | ||
<span> | ||
Card Placeholder | ||
</span> | ||
</Column> | ||
<Column sm={4} md={4} lg={4}> | ||
<span> | ||
Card Placeholder | ||
</span> | ||
</Column> | ||
<Column sm={4} md={4} lg={4}> | ||
<span> | ||
Card Placeholder | ||
</span> | ||
</Column> | ||
</Row> | ||
<Row className="seedlot-dashboard-content"> | ||
<Column> | ||
Exisisting Seedlot Placeholder | ||
</Column> | ||
</Row> | ||
</Stack> | ||
</FlexGrid> | ||
); | ||
|
||
export default SeedlotDashboard; |
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,15 @@ | ||
.seedlot-dashboard-content { | ||
padding-left: 2.5rem; | ||
} | ||
|
||
@media only screen and (max-width: 1584px) { | ||
.seedlot-dashboard-content { | ||
padding-left: 2rem; | ||
} | ||
} | ||
|
||
@media only screen and (max-width: 672px) { | ||
.seedlot-dashboard-content { | ||
padding-left: 1rem; | ||
} | ||
} |