Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bielefeld-CeBiTec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
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
2024 Competition
Bielefeld-CeBiTec
Commits
8ad6536f
Commit
8ad6536f
authored
5 months ago
by
Liliana Sanfilippo
Browse files
Options
Downloads
Patches
Plain Diff
Tables
parent
42f029d1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#445274
failed
5 months ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/Table.tsx
+40
-0
40 additions, 0 deletions
src/components/Table.tsx
src/data/parts.ts
+45
-0
45 additions, 0 deletions
src/data/parts.ts
with
85 additions
and
0 deletions
src/components/Table.tsx
0 → 100644
+
40
−
0
View file @
8ad6536f
import
{
Part
}
from
"
../data/parts
"
;
export
function
PartTable
(
data
:
Array
<
Part
>
,
cols
:
Array
<
string
>
){
let
list
=
[];
for
(
let
index
=
0
;
index
<
data
.
length
;
index
++
)
{
list
.
push
(
<
tr
>
<
td
>
{
data
[
index
].
partname
}
</
td
>
<
td
><
a
href
=
{
data
[
index
].
url
}
>
{
data
[
index
].
registrycode
}
</
a
></
td
>
<
td
>
{
data
[
index
].
description
}
</
td
>
<
td
>
{
data
[
index
].
length
}
</
td
>
<
td
>
{
data
[
index
].
type
}
</
td
>
</
tr
>
)
}
let
heads
=
[];
for
(
let
index
=
0
;
index
<
cols
.
length
;
index
++
)
{
heads
.
push
(<
td
>
cols[index]
</
td
>)
}
return
(
<
div
className
=
"flex flex-col"
>
<
div
className
=
"overflow-x-auto sm:-mx-6 lg:-mx-8"
>
<
div
className
=
"inline-block min-w-full py-4 sm:px-6 lg:px-8"
>
<
div
className
=
"overflow-hidden p-2"
>
<
table
className
=
"min-w-full text-center"
>
<
thead
className
=
"border-b bg-gray-50"
>
<
tr
>
{
heads
}
</
tr
>
</
thead
>
<
tbody
>
{
list
}
</
tbody
>
</
table
>
</
div
>
</
div
>
</
div
>
</
div
>
)
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/data/parts.ts
0 → 100644
+
45
−
0
View file @
8ad6536f
export
interface
Part
{
partname
:
string
,
registrycode
:
number
,
description
:
string
,
length
:
number
,
type
:
PartType
,
url
:
string
}
type
PartType
=
"
DNA
"
|
"
Protein
"
;
/*
Vorlage:
{
partname: "",
registrycode: ,
description: "",
length: ,
type: "",
url: ""
},
*/
export
const
BasicParts
:
Array
<
Part
>
=
[
{
partname
:
"
Beispiel
"
,
registrycode
:
0
,
description
:
"
Beispiel Description
"
,
length
:
0
,
type
:
"
DNA
"
,
url
:
"
.....
"
},
]
export
const
CompositeParts
:
Array
<
Part
>
=
[
{
partname
:
"
Beispiel
"
,
registrycode
:
0
,
description
:
"
Beispiel Description
"
,
length
:
0
,
type
:
"
DNA
"
,
url
:
"
.....
"
},
]
\ No newline at end of file
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