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
355b01f0
Commit
355b01f0
authored
3 years ago
by
Francesco
Browse files
Options
Downloads
Patches
Plain Diff
Tabs Are Now Responsive
parent
1de66e6e
No related branches found
No related tags found
1 merge request
!60
New component to search senior (see #12). Enhance responsiveness and solve #10 and #11
Pipeline
#12675
passed
3 years ago
Stage: build
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Dashboard/HomePage/NavBar.tsx
+76
-28
76 additions, 28 deletions
src/components/Dashboard/HomePage/NavBar.tsx
with
76 additions
and
28 deletions
src/components/Dashboard/HomePage/NavBar.tsx
+
76
−
28
View file @
355b01f0
import
React
,
{
FC
}
from
'
react
'
;
import
React
,
{
FC
}
from
'
react
'
;
import
{
makeStyles
}
from
'
@material-ui/core/styles
'
;
import
{
makeStyles
}
from
'
@material-ui/core/styles
'
;
import
{
Tabs
,
Tab
}
from
'
@material-ui/core
'
;
import
{
Tabs
,
Tab
,
Grid
,
Hidden
}
from
'
@material-ui/core
'
;
import
HomeIcon
from
'
@material-ui/icons/Home
'
;
import
HomeIcon
from
'
@material-ui/icons/Home
'
;
import
ImportContactsIcon
from
'
@material-ui/icons/ImportContacts
'
;
import
ImportContactsIcon
from
'
@material-ui/icons/ImportContacts
'
;
import
AccountCircleIcon
from
'
@material-ui/icons/AccountCircle
'
;
import
AccountCircleIcon
from
'
@material-ui/icons/AccountCircle
'
;
...
@@ -28,6 +28,21 @@ const useStyles = makeStyles(() => ({
...
@@ -28,6 +28,21 @@ const useStyles = makeStyles(() => ({
rightAlign
:
{
rightAlign
:
{
marginLeft
:
'
auto
'
,
marginLeft
:
'
auto
'
,
},
},
tabsSmall
:
{
color
:
'
white
'
,
paddingLeft
:
'
1.2em
'
,
paddingRight
:
'
1em
'
,
paddingTop
:
'
0.9em
'
,
paddingBottom
:
'
2em
'
,
width
:
'
100%
'
,
},
tabIconSmall
:
{
fontSize
:
'
2.4em
'
,
},
tabPanSmall
:
{
paddingLeft
:
'
2em
'
,
paddingRight
:
'
2em
'
,
},
}));
}));
export
const
NavBar
:
FC
=
()
=>
{
export
const
NavBar
:
FC
=
()
=>
{
...
@@ -45,32 +60,65 @@ export const NavBar: FC = () => {
...
@@ -45,32 +60,65 @@ export const NavBar: FC = () => {
};
};
return
(
return
(
<
Tabs
<
div
>
variant
=
"scrollable"
<
Hidden
smDown
>
scrollButtons
=
"on"
<
Tabs
onChange
=
{
handleChange
}
onChange
=
{
handleChange
}
value
=
{
value
}
value
=
{
value
}
className
=
{
classes
.
tabs
}
className
=
{
classes
.
tabs
}
TabIndicatorProps
=
{
{
style
:
{
display
:
'
none
'
}
}
}
TabIndicatorProps
=
{
{
style
:
{
display
:
'
none
'
}
}
}
>
>
<
Tab
<
Tab
label
=
"HomePage"
label
=
"HomePage"
value
=
{
`
${
AuthRoutes
.
dashboard
}${
AuthRoutes
.
home
}
`
}
value
=
{
`
${
AuthRoutes
.
dashboard
}${
AuthRoutes
.
home
}
`
}
icon
=
{
<
HomeIcon
className
=
{
classes
.
tabIcon
}
/>
}
icon
=
{
<
HomeIcon
className
=
{
classes
.
tabIcon
}
/>
}
className
=
{
classes
.
tabPan
}
className
=
{
classes
.
tabPan
}
/>
/>
<
Tab
label
=
"Reservation"
<
Tab
value
=
{
`
${
AuthRoutes
.
dashboard
}${
AuthRoutes
.
reservation
}
`
}
label
=
"Reservation"
icon
=
{
<
ImportContactsIcon
className
=
{
classes
.
tabIcon
}
/>
}
value
=
{
`
${
AuthRoutes
.
dashboard
}${
AuthRoutes
.
reservation
}
`
}
className
=
{
`
${
classes
.
tabPan
}
${
classes
.
rightAlign
}
`
}
icon
=
{
<
ImportContactsIcon
className
=
{
classes
.
tabIcon
}
/>
}
/>
className
=
{
`
${
classes
.
tabPan
}
${
classes
.
rightAlign
}
`
}
<
Tab
/>
label
=
"Profile"
<
Tab
value
=
{
`
${
AuthRoutes
.
dashboard
}${
AuthRoutes
.
profile
}
`
}
label
=
"Profile"
className
=
{
classes
.
tabPan
}
value
=
{
`
${
AuthRoutes
.
dashboard
}${
AuthRoutes
.
profile
}
`
}
icon
=
{
<
AccountCircleIcon
className
=
{
classes
.
tabIcon
}
/>
}
className
=
{
classes
.
tabPan
}
/>
icon
=
{
<
AccountCircleIcon
className
=
{
classes
.
tabIcon
}
/>
}
</
Tabs
>
/>
</
Tabs
>
</
Hidden
>
<
Hidden
mdUp
>
<
Tabs
onChange
=
{
handleChange
}
value
=
{
value
}
className
=
{
classes
.
tabsSmall
}
TabIndicatorProps
=
{
{
style
:
{
display
:
'
none
'
}
}
}
centered
>
<
Tab
label
=
""
value
=
{
`
${
AuthRoutes
.
dashboard
}${
AuthRoutes
.
home
}
`
}
icon
=
{
<
HomeIcon
className
=
{
classes
.
tabIconSmall
}
/>
}
className
=
{
classes
.
tabPanSmall
}
/>
<
Tab
label
=
""
value
=
{
`
${
AuthRoutes
.
dashboard
}${
AuthRoutes
.
reservation
}
`
}
icon
=
{
<
ImportContactsIcon
className
=
{
classes
.
tabIconSmall
}
/>
}
className
=
{
classes
.
tabPanSmall
}
/>
<
Tab
label
=
""
value
=
{
`
${
AuthRoutes
.
dashboard
}${
AuthRoutes
.
profile
}
`
}
icon
=
{
<
AccountCircleIcon
className
=
{
classes
.
tabIconSmall
}
/>
}
className
=
{
classes
.
tabPanSmall
}
/>
</
Tabs
>
</
Hidden
>
</
div
>
);
);
};
};
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