Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
backoffice_client
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
Container Registry
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
backoffice_client
Commits
354651eb
Commit
354651eb
authored
1 year ago
by
Bastien DUMONT
Browse files
Options
Downloads
Patches
Plain Diff
date selector
parent
80348d1a
No related branches found
No related tags found
1 merge request
!118
feat(ui): use mui components and upgrade to v5
Pipeline
#73254
passed
1 year ago
Stage: quality
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/Newsletter/DateSelector/DateSelector.tsx
+8
-13
8 additions, 13 deletions
src/components/Newsletter/DateSelector/DateSelector.tsx
src/components/Newsletter/DateSelector/dateSelector.scss
+3
-6
3 additions, 6 deletions
src/components/Newsletter/DateSelector/dateSelector.scss
with
11 additions
and
19 deletions
src/components/Newsletter/DateSelector/DateSelector.tsx
+
8
−
13
View file @
354651eb
import
{
Button
}
from
'
@mui/material
'
import
{
Button
,
IconButton
}
from
'
@mui/material
'
import
React
,
{
useState
}
from
'
react
'
import
React
,
{
useState
}
from
'
react
'
import
leftChevron
from
'
../../../assets/icons/left-chevron.svg
'
import
leftChevron
from
'
../../../assets/icons/left-chevron.svg
'
import
rightChevron
from
'
../../../assets/icons/right-chevron.svg
'
import
rightChevron
from
'
../../../assets/icons/right-chevron.svg
'
...
@@ -45,21 +45,16 @@ const DateSelector: React.FC<DateSelectorProps> = ({
...
@@ -45,21 +45,16 @@ const DateSelector: React.FC<DateSelectorProps> = ({
}
}
return
(
return
(
<
div
className
=
"date-selector"
>
<
div
className
=
"date-selector"
>
<
img
<
IconButton
onClick
=
{
handlePrevMonth
}
>
src
=
{
leftChevron
}
<
img
src
=
{
leftChevron
}
alt
=
"Previous Month"
className
=
"arrow"
/>
alt
=
"Previous Month"
</
IconButton
>
onClick
=
{
handlePrevMonth
}
className
=
"arrow"
/>
<
div
className
=
"text"
>
<
div
className
=
"text"
>
{
date
.
toLocaleString
(
'
default
'
,
{
month
:
'
long
'
,
year
:
'
numeric
'
})
}
{
date
.
toLocaleString
(
'
default
'
,
{
month
:
'
long
'
,
year
:
'
numeric
'
})
}
</
div
>
</
div
>
<
img
<
IconButton
onClick
=
{
handleNextMonth
}
>
src
=
{
rightChevron
}
<
img
src
=
{
rightChevron
}
alt
=
"Next Month"
className
=
"arrow"
/>
alt
=
"Next Month"
</
IconButton
>
onClick
=
{
handleNextMonth
}
className
=
"arrow"
/>
{
openModal
&&
(
{
openModal
&&
(
<
Modal
>
<
Modal
>
<>
<>
...
...
This diff is collapsed.
Click to expand it.
src/components/Newsletter/DateSelector/dateSelector.scss
+
3
−
6
View file @
354651eb
...
@@ -26,14 +26,11 @@
...
@@ -26,14 +26,11 @@
padding
:
0
.5rem
;
padding
:
0
.5rem
;
border-radius
:
50%
;
border-radius
:
50%
;
background
:
#343641
;
background
:
#343641
;
margin
:
0
0
.5rem
;
box-shadow
:
box-shadow
:
0px
5px
5px
rgb
(
0
0
0
/
20%
)
,
0px
3px
14px
rgb
(
0
0
0
/
12%
)
,
0px
5px
5px
rgb
(
0
0
0
/
20%
)
,
0px
3px
14px
rgb
(
0
0
0
/
12%
)
,
0px
8px
10px
rgb
(
0
0
0
/
14%
);
0px
8px
10px
rgb
(
0
0
0
/
14%
);
transition
:
all
300ms
ease
;
transition
:
all
300ms
ease
;
&
:hover
{
background
:
$text-grey
;
opacity
:
0
.9
;
}
}
}
}
}
.modal-text
{
.modal-text
{
...
...
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