-
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.
UI Scroll layout for the graphs (#242)
* scoll layout * update cards content * fix typo * refined approach using useRef and single Card * added some children for testing * graciously handle lint errors * Track the page reference --------- Co-authored-by: Gabriele Granello <[email protected]>
- Loading branch information
1 parent
d85d585
commit 5313afb
Showing
3 changed files
with
89 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from "react"; | ||
|
||
type Props = React.PropsWithChildren<{ | ||
title: string; | ||
}>; | ||
|
||
const GraphCard: React.FC<Props> = ({ title, children }) => { | ||
return ( | ||
<div className="h-screen snap-start"> | ||
<span className="text-2xl text-black">{title}</span> | ||
{children && <div className="mt-4">{children}</div>} | ||
</div> | ||
); | ||
}; | ||
|
||
export default GraphCard; |
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