Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Let Me Trial
web-medico
Commits
2dcb240c
Commit
2dcb240c
authored
11 months ago
by
Eduardo Felber Eichner
Browse files
Options
Download
Email Patches
Plain Diff
#39
[feat] remove Slide e adiciona index.css
parent
1263010e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Alerta/index.tsx
+21
-41
src/components/Alerta/index.tsx
with
21 additions
and
41 deletions
+21
-41
src/components/Alerta/index.tsx
View file @
2dcb240c
...
...
@@ -2,6 +2,7 @@
import
{
Alert
,
AlertTitle
,
IconButton
,
Button
,
Slide
}
from
"
@mui/material
"
;
import
{
useState
,
useEffect
}
from
"
react
"
;
import
'
./index.css
'
;
interface
AlertaProps
{
tipoFeedback
:
"
success
"
|
"
info
"
|
"
warning
"
|
"
error
"
...
...
@@ -40,53 +41,32 @@ export default function Alerta({
<
Button
onClick
=
{
toggleAlert
}
>
{
showAlert
?
'
Ocultar Alerta
'
:
'
Mostrar Alerta
'
}
</
Button
>
<
Slide
direction
=
"down"
in
=
{
showAlert
}
mountOnEnter
unmountOnExit
timeout
=
{
500
}
>
<
div
<
div
className
=
{
`container-alert
${
showAlert
?
'
show
'
:
'
hide
'
}
`
}
>
<
Alert
severity
=
{
tipoFeedback
}
action
=
{
<
IconButton
aria
-
label
=
"close"
color
=
"inherit"
size
=
"small"
onClick
=
{
toggleAlert
}
style
=
{
{
alignSelf
:
'
center
'
,
margin
:
'
auto
'
}
}
>
×
</
IconButton
>
}
style
=
{
{
display
:
"
flex
"
,
flexDirection
:
"
column
"
,
padding
:
"
0.625rem
"
,
maxWidth
:
"
31.25rem
"
,
justifyContent
:
"
center
"
,
alignItems
:
"
center
"
,
position
:
'
fixed
'
,
top
:
'
7%
'
,
left
:
'
50%
'
,
transform
:
'
translate(-50%, -50%)
'
,
zIndex
:
1000
,
wordWrap
:
"
break-word
"
,
width
:
"
100%
"
}
}
>
<
Alert
severity
=
{
tipoFeedback
}
action
=
{
<
IconButton
aria
-
label
=
"close"
color
=
"inherit"
size
=
"small"
onClick
=
{
toggleAlert
}
style
=
{
{
alignSelf
:
'
center
'
,
margin
:
'
auto
'
}
}
>
×
</
IconButton
>
}
style
=
{
{
display
:
"
flex
"
,
justifyContent
:
"
center
"
,
alignItems
:
"
center
"
,
wordWrap
:
"
break-word
"
}
}
>
<
AlertTitle
>
{
tituloFeedback
}
</
AlertTitle
>
{
mensagemFeedback
}
</
Alert
>
</
div
>
</
Slide
>
<
AlertTitle
>
{
tituloFeedback
}
</
AlertTitle
>
{
mensagemFeedback
}
</
Alert
>
</
div
>
</>
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help