Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
red-giant
dashboard
Commits
4d5834ad
Verified
Commit
4d5834ad
authored
3 years ago
by
Defendi Alberto
Browse files
Options
Downloads
Patches
Plain Diff
Pass parameters to component and Grid tags.
parent
72a11a4b
No related branches found
No related tags found
2 merge requests
!56
Refined auth flow and new website pages.
,
!54
Setup reservation for api compatibility.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Dashboard/ReservationPage/Reservation/Reservation.tsx
+36
-33
36 additions, 33 deletions
...nts/Dashboard/ReservationPage/Reservation/Reservation.tsx
with
36 additions
and
33 deletions
src/components/Dashboard/ReservationPage/Reservation/Reservation.tsx
+
36
−
33
View file @
4d5834ad
import
React
,
{
FC
}
from
'
react
'
;
import
{
makeStyles
}
from
'
@material-ui/core/styles
'
;
import
{
Grid
,
Paper
,
Table
,
TableBody
,
...
...
@@ -18,43 +19,45 @@ const useStyles = makeStyles(() => ({
},
}));
function
createData
(
name
:
string
,
value
:
string
,
):
{
name
:
string
;
value
:
string
}
{
return
{
name
,
value
};
}
const
rows
=
[
createData
(
'
From:
'
,
'
Via Di Quel Bozen, 45, 39037
'
),
createData
(
'
Date:
'
,
'
29 / 07 / 2021
'
),
createData
(
'
Time:
'
,
'
12:15
'
),
createData
(
'
To:
'
,
'
Via del Krankenhaus, 7, 39037
'
),
];
type
ReservationProps
=
{
departure
:
string
;
destination
:
string
;
time
:
string
;
date
:
string
;
};
export
const
Reservation
:
FC
=
()
=>
{
export
const
Reservation
:
FC
<
ReservationProps
>
=
({
departure
,
destination
,
time
,
date
,
}:
ReservationProps
)
=>
{
const
classes
=
useStyles
();
return
(
<
TableContainer
component
=
{
Paper
}
>
<
Table
aria-label
=
"simple table"
>
<
TableHead
>
<
TableRow
>
<
TableCell
>
DriveToHospital
</
TableCell
>
</
TableRow
>
</
TableHead
>
<
Grid
item
container
style
=
{
{
paddingTop
:
'
20px
'
}
}
>
<
Grid
item
xs
=
{
1
}
lg
=
{
2
}
/>
<
Grid
item
xs
=
{
10
}
lg
=
{
8
}
>
<
TableContainer
component
=
{
Paper
}
>
<
Table
aria-label
=
"simple table"
>
<
TableHead
>
<
TableRow
>
<
TableCell
>
DriveToHospital
</
TableCell
>
</
TableRow
>
</
TableHead
>
<
TableBody
>
{
rows
.
map
((
row
)
=>
(
<
TableRow
key
=
{
row
.
name
}
>
<
TableCell
component
=
"th"
scope
=
"row"
>
{
row
.
name
}
</
TableCell
>
<
TableCell
align
=
"right"
>
{
row
.
value
}
</
TableCell
>
</
TableRow
>
))
}
</
TableBody
>
</
Table
>
</
TableContainer
>
<
TableBody
>
<
TableRow
key
=
"departure"
>
<
TableCell
component
=
"th"
scope
=
"row"
>
Departure
</
TableCell
>
<
TableCell
align
=
"right"
>
{
departure
}
</
TableCell
>
</
TableRow
>
</
TableBody
>
</
Table
>
</
TableContainer
>
</
Grid
>
<
Grid
item
xs
=
{
1
}
lg
=
{
2
}
/>
</
Grid
>
);
};
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