Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CryptoMetrics_L02_GRP15
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
L02_GRP15
CryptoMetrics_L02_GRP15
Commits
70eb4b50
Commit
70eb4b50
authored
3 years ago
by
Aggarwal Himanshu
Browse files
Options
Downloads
Patches
Plain Diff
Add table header; Make header sticky
parent
631a0020
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!7
Merge develop to main
,
!6
Add a Table View for Cryptocurrencies
,
!4
Improve Table UI and make it more modular
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cryptometrics/pages/index.js
+35
-14
35 additions, 14 deletions
src/cryptometrics/pages/index.js
with
35 additions
and
14 deletions
src/cryptometrics/pages/index.js
+
35
−
14
View file @
70eb4b50
...
...
@@ -91,6 +91,37 @@ export default function Home() {
content
=
{
<
TableIcon
className
=
"
w-6 h-6 dark:text-white
"
/>
}
>
<
Table
>
<
TableRow
className
=
"
h-14 items-center sticky top-0 z-50
"
>
<
TableCell
className
=
"
w-6 h-10
"
><
/TableCell
>
<
TableCell
className
=
"
w-24 h-10
"
>
<
p
className
=
"
font-medium text-base text-center
"
>
Name
<
/p
>
<
/TableCell
>
<
TableCell
className
=
"
w-24 h-10
"
>
<
p
className
=
"
font-medium text-base text-center
"
>
Price
<
/p
>
<
/TableCell
>
<
TableCell
className
=
"
w-[10%] h-10
"
>
<
p
className
=
"
font-medium text-base text-center
"
>
Market
Cap
<
/p
>
<
/TableCell
>
<
TableCell
className
=
"
w-40 h-10
"
>
<
p
className
=
"
font-medium text-base text-center
"
>
24
h
change
in
%
<
/p
>
<
/TableCell
>
<
TableCell
className
=
"
w-40 h-10
"
>
<
p
className
=
"
font-medium text-base text-center
"
>
24
h
change
in
$
<
/p
>
<
/TableCell
>
<
TableCell
className
=
"
h-10
"
>
<
div
className
=
"
w-52
"
>
<
p
className
=
"
font-medium text-base text-center
"
>
Chart
<
/p
>
<
/div
>
<
/TableCell
>
<
/TableRow
>
{
!
listOfCoins
.
isLoading
&&
filteredCoins
.
map
((
coin
,
index
)
=>
{
return
(
...
...
@@ -119,8 +150,7 @@ export default function Home() {
<
/p
>
<
/TableCell
>
<
TableCell
className
=
"
w-24
"
>
<
p
className
=
"
font-medium text-base
"
>
Price
<
/p
>
<
p
className
=
"
font-light text-sm text-blue-500 mt-1
"
>
<
p
className
=
"
font-light text-base text-blue-500 mt-1
"
>
$
{
numeral
(
coin
.
current_price
).
format
(
"
0,0.[0000000]
"
...
...
@@ -128,10 +158,7 @@ export default function Home() {
<
/p
>
<
/TableCell
>
<
TableCell
className
=
"
w-[10%]
"
>
<
p
className
=
"
font-medium text-base
"
>
Market
Cap
<
/p
>
<
p
className
=
"
font-light text-sm text-pink-400 mt-1
"
>
<
p
className
=
"
font-light text-base text-pink-400 mt-1
"
>
$
{
numeral
(
coin
.
market_cap
).
format
(
"
0,0.[000]a
"
...
...
@@ -139,12 +166,9 @@ export default function Home() {
<
/p
>
<
/TableCell
>
<
TableCell
className
=
"
w-40
"
>
<
p
className
=
"
font-medium text-base
"
>
24
h
change
in
%
<
/p
>
<
p
className
=
{
classNames
(
"
font-light text-
sm
mt-1
"
,
"
font-light text-
base
mt-1
"
,
{
"
text-red-400
"
:
coin
.
price_change_percentage_24h
<
0
,
...
...
@@ -160,12 +184,9 @@ export default function Home() {
<
/p
>
<
/TableCell
>
<
TableCell
className
=
"
w-40
"
>
<
p
className
=
"
font-medium text-base
"
>
24
h
change
in
$
<
/p
>
<
p
className
=
{
classNames
(
"
font-light text-
sm
mt-1
"
,
"
font-light text-
base
mt-1
"
,
{
"
text-red-400
"
:
coin
.
price_change_24h
<
0
,
"
text-green-400
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment