Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Clutch
Commits
95731f9e
Commit
95731f9e
authored
4 years ago
by
Derek Schaller
Browse files
Options
Download
Email Patches
Plain Diff
css cleanup
parent
05545556
errorV2
alertV2
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/packages/core/src/Feedback/alert.tsx
+25
-8
frontend/packages/core/src/Feedback/alert.tsx
frontend/packages/core/src/Feedback/stories/alert.stories.tsx
+0
-1
...tend/packages/core/src/Feedback/stories/alert.stories.tsx
with
25 additions
and
9 deletions
+25
-9
frontend/packages/core/src/Feedback/alert.tsx
+
25
-
8
View file @
95731f9e
import
*
as
React
from
"
react
"
;
import
styled
from
"
@emotion/styled
"
;
import
{
Grid
}
from
"
@material-ui/core
"
;
import
CheckCircle
Icon
from
"
@material-ui/icons/CheckCircle
"
;
import
ErrorIcon
from
"
@material-ui/icons/Error
"
;
import
InfoIcon
from
"
@material-ui/icons/Info
"
;
import
WarningIcon
from
"
@material-ui/icons/Warning
"
;
import
MuiSuccess
Icon
from
"
@material-ui/icons/CheckCircle
"
;
import
Mui
ErrorIcon
from
"
@material-ui/icons/Error
"
;
import
Mui
InfoIcon
from
"
@material-ui/icons/Info
"
;
import
Mui
WarningIcon
from
"
@material-ui/icons/Warning
"
;
import
type
{
AlertProps
as
MuiAlertProps
}
from
"
@material-ui/lab
"
;
import
{
Alert
as
MuiAlert
,
AlertTitle
as
MuiAlertTitle
}
from
"
@material-ui/lab
"
;
...
...
@@ -39,6 +39,23 @@ const StyledAlert = styled(MuiAlert)(
})
);
const
ErrorIcon
=
styled
(
MuiErrorIcon
)({
color
:
"
#db3716
"
,
});
const
InfoIcon
=
styled
(
MuiInfoIcon
)({
color
:
"
#3548d4
"
,
});
const
SuccessIcon
=
styled
(
MuiSuccessIcon
)({
color
:
"
#1e942d
"
,
});
const
WarningIcon
=
styled
(
MuiWarningIcon
)({
color
:
"
#ffcc80
"
,
});
const
AlertTitle
=
styled
(
MuiAlertTitle
)({
color
:
"
#0D1030
"
,
fontWeight
:
600
,
...
...
@@ -46,10 +63,10 @@ const AlertTitle = styled(MuiAlertTitle)({
});
const
iconMappings
=
{
error
:
<
ErrorIcon
style
=
{
{
color
:
"
#db3716
"
}
}
/>,
info
:
<
InfoIcon
style
=
{
{
color
:
"
#3548d4
"
}
}
/>,
success
:
<
CheckCircleIcon
style
=
{
{
color
:
"
#1e942d
"
}
}
/>,
warning
:
<
WarningIcon
style
=
{
{
color
:
"
#ffcc80
"
}
}
/>,
error
:
<
ErrorIcon
/>,
info
:
<
InfoIcon
/>,
success
:
<
SuccessIcon
/>,
warning
:
<
WarningIcon
/>,
};
export
interface
AlertProps
extends
Pick
<
MuiAlertProps
,
"
severity
"
>
{
title
?:
React
.
ReactNode
;
...
...
This diff is collapsed.
Click to expand it.
frontend/packages/core/src/Feedback/stories/alert.stories.tsx
+
0
-
1
View file @
95731f9e
...
...
@@ -19,7 +19,6 @@ WithTitle.args = {
export
const
Success
=
Template
.
bind
({});
Success
.
args
=
{
severity
:
"
success
"
,
title
:
"
A title
"
,
};
export
const
Error
=
Template
.
bind
({});
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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