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
8acee02c
Commit
8acee02c
authored
3 years ago
by
Aggarwal Himanshu
Browse files
Options
Downloads
Patches
Plain Diff
Add table header component
parent
fc6445a6
No related branches found
No related tags found
2 merge requests
!17
Merge develop into main
,
!14
Fix Table Header
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cryptometrics/components/table/Table.js
+13
-0
13 additions, 0 deletions
src/cryptometrics/components/table/Table.js
src/cryptometrics/pages/index.js
+9
-4
9 additions, 4 deletions
src/cryptometrics/pages/index.js
with
22 additions
and
4 deletions
src/cryptometrics/components/table/Table.js
+
13
−
0
View file @
8acee02c
...
...
@@ -18,6 +18,19 @@ export function TableRow({ children, className }) {
);
}
export
function
TableHeader
({
children
,
className
})
{
return
(
<
th
className
=
{
classNames
(
"
w-full flex justify-between dark:bg-dark-800 shadow-lg shadow-dark-800 my-4 mx-2 px-6 text-slate-900 dark:text-white
"
,
className
)}
>
{
children
}
<
/th
>
);
}
export
function
TableCell
({
children
,
className
})
{
return
(
<
td
...
...
This diff is collapsed.
Click to expand it.
src/cryptometrics/pages/index.js
+
9
−
4
View file @
8acee02c
...
...
@@ -21,7 +21,12 @@ import { useFilters, useOnClickOutside } from "../hooks";
import
{
Filter
,
FilterButton
,
Filters
}
from
"
../components/filters/Filter
"
;
import
{
FilterDropdown
}
from
"
../components/dropdown/FilterDropdown
"
;
import
{
filterOptions
}
from
"
../constants
"
;
import
{
Table
,
TableCell
,
TableRow
}
from
"
../components/table/Table
"
;
import
{
Table
,
TableCell
,
TableHeader
,
TableRow
,
}
from
"
../components/table/Table
"
;
import
Image
from
"
next/image
"
;
import
CryptoRowLineChart
from
"
../components/charts/CryptoRowLineChart
"
;
import
classNames
from
"
classnames
"
;
...
...
@@ -166,8 +171,8 @@ export default function Home() {
>
<
Table
>
{
/* Table Header */
}
<
Table
Row
className
=
"
h-14 items-center sticky top-0 z-40
"
>
<
TableCell
className
=
"
w-6 h-10
"
>
<
/TableCell
>
<
Table
Header
className
=
"
h-14 items-center sticky top-0 z-40
"
>
<
TableCell
className
=
"
w-6 h-10
text-center
"
>
Icon
<
/TableCell
>
<
TableCell
className
=
"
w-24 h-10
"
>
<
p
className
=
"
font-medium text-base text-center
"
>
Name
<
/p
>
<
/TableCell
>
...
...
@@ -196,7 +201,7 @@ export default function Home() {
<
/p
>
<
/div
>
<
/TableCell
>
<
/Table
Row
>
<
/Table
Header
>
{
/* Table Content */
}
{
!
listOfCoins
.
isLoading
&&
...
...
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