diff --git a/ui/client/bootstrap.tsx b/ui/client/bootstrap.tsx index 265915b86fe..356e59637a1 100644 --- a/ui/client/bootstrap.tsx +++ b/ui/client/bootstrap.tsx @@ -15,7 +15,6 @@ import {NkThemeProvider} from "./containers/theme" import history from "./history" import "./i18n" import configureStore from "./store/configureStore" -import "./stylesheets/notifications.styl" const {store, persistor} = configureStore() const rootContainer = document.createElement(`div`) diff --git a/ui/client/components/notifications/Notification.js b/ui/client/components/notifications/Notification.js deleted file mode 100644 index 17e73adc458..00000000000 --- a/ui/client/components/notifications/Notification.js +++ /dev/null @@ -1,30 +0,0 @@ -import PropTypes from "prop-types" -import React from "react" -import Dotdotdot from "react-dotdotdot" -import InlinedSvgs from "../../assets/icons/InlinedSvgs" -import HeaderIcon from "../tips/HeaderIcon" - -export default function Notification(props) { - const {icon, message, details} = props - - return ( -
-
-
- {!_.isEmpty(message) && {message}} - {!_.isEmpty(details) && ( - - {details} - - )} -
- -
- ) -} - -Notification.propTypes = { - icon: PropTypes.string.isRequired, - message: PropTypes.string, - details: PropTypes.string, -} diff --git a/ui/client/components/notifications/Notification.tsx b/ui/client/components/notifications/Notification.tsx new file mode 100644 index 00000000000..a468805032a --- /dev/null +++ b/ui/client/components/notifications/Notification.tsx @@ -0,0 +1,29 @@ +import {isEmpty} from "lodash" +import React from "react" +import Dotdotdot from "react-dotdotdot" +import InlinedSvgs from "../../assets/icons/InlinedSvgs" +import HeaderIcon from "../tips/HeaderIcon" +import classnames from "./notifications.styl" + +interface Props { + icon: string, + message?: string, + details?: string, +} + +export default function Notification({icon, message, details}: Props): JSX.Element { + return ( +
+
+
+ {!isEmpty(message) && {message}} + {!isEmpty(details) && ( + + {details} + + )} +
+ +
+ ) +} diff --git a/ui/client/stylesheets/notifications.styl b/ui/client/components/notifications/notifications.styl similarity index 95% rename from ui/client/stylesheets/notifications.styl rename to ui/client/components/notifications/notifications.styl index b41ed797dc2..e4bb7cb3e79 100644 --- a/ui/client/stylesheets/notifications.styl +++ b/ui/client/components/notifications/notifications.styl @@ -1,4 +1,4 @@ -@import "./_variables.styl" +@import "../../stylesheets/_variables.styl" .notifications-wrapper position absolute @@ -11,7 +11,7 @@ width: 300px max-height 400px font-family "Open Sans" - font-size: 16 + font-size: 16px display flex border 1px solid #3a3a3a color #333333 diff --git a/ui/client/cypress/integration/__image_snapshots__/Process initially clean should import JSON and save [Linux] #1.png b/ui/client/cypress/integration/__image_snapshots__/Process initially clean should import JSON and save [Linux] #1.png index a13135b4b9e..e1e78b4b87e 100644 Binary files a/ui/client/cypress/integration/__image_snapshots__/Process initially clean should import JSON and save [Linux] #1.png and b/ui/client/cypress/integration/__image_snapshots__/Process initially clean should import JSON and save [Linux] #1.png differ