diff --git a/app/javascript/packs/app/constants/colors.js b/app/javascript/packs/app/constants/colors.js index 9b4ad3aa3..d86e42085 100644 --- a/app/javascript/packs/app/constants/colors.js +++ b/app/javascript/packs/app/constants/colors.js @@ -3,3 +3,4 @@ export const WHITE_COLOR = "#fff"; export const BORDER_GRAY_COLOR = "#d2d2d2"; export const WILD_SAND_COLOR = "#f5f5f5"; export const MYSTIC_COLOR = "#eaeff2"; +export const ICON_GREEN_COLOR = "#8fd13f"; diff --git a/app/javascript/packs/src/settings/components/NotificationsGroup.jsx b/app/javascript/packs/src/settings/components/NotificationsGroup.jsx index b6d27de4d..494fb9a2c 100644 --- a/app/javascript/packs/src/settings/components/NotificationsGroup.jsx +++ b/app/javascript/packs/src/settings/components/NotificationsGroup.jsx @@ -3,12 +3,12 @@ import PropTypes from "prop-types"; import styled from "styled-components"; import NotificationsSwitchGroup from "./NotificationsSwitchGroup"; +import { WHITE_COLOR } from "../../../app/constants/colors"; const Icon = styled.span` - background-color: silver; border-radius: 50%; - color: #f5f5f5; - display: block !important; + color: ${WHITE_COLOR}; + display: block; font-size: 15px; height: 30px; margin-right: 15px; @@ -18,19 +18,44 @@ const Icon = styled.span` width: 30px; `; +const Image = styled.span` + border-radius: 50%; + color: ${WHITE_COLOR}; + display: block; + font-size: 15px; + height: 30px; + margin-right: 15px; + width: 30px; + overflow: hidden; +`; + class NotificationsGroup extends Component { constructor(props) { super(props); } render() { + let imgOrIcon; + + if (this.props.imgUrl === "") { + imgOrIcon = ( + + + + ); + } else { + imgOrIcon = ( + + default avatar + + ); + } + return (
- - - + {imgOrIcon}
@@ -50,7 +75,10 @@ class NotificationsGroup extends Component { NotificationsGroup.propTypes = { title: PropTypes.string.isRequired, subtitle: PropTypes.string.isRequired, - type: PropTypes.string.isRequired + type: PropTypes.string.isRequired, + imgUrl: PropTypes.string.isRequired, + iconClasses: PropTypes.string.isRequired, + iconBackground: PropTypes.string.isRequired }; export default NotificationsGroup; diff --git a/app/javascript/packs/src/settings/components/SettingsPreferences.jsx b/app/javascript/packs/src/settings/components/SettingsPreferences.jsx index 2c0afdd4f..6f6d7fd72 100644 --- a/app/javascript/packs/src/settings/components/SettingsPreferences.jsx +++ b/app/javascript/packs/src/settings/components/SettingsPreferences.jsx @@ -11,6 +11,10 @@ import { RECENT_NOTIFICATION, SYSTEM_NOTIFICATION } from "./constants"; +import { + MAIN_COLOR_BLUE, + ICON_GREEN_COLOR +} from "../../../app/constants/colors"; class SettingsPreferences extends Component { constructor(props) { @@ -63,19 +67,25 @@ class SettingsPreferences extends Component { type={ASSIGNMENT_NOTIFICATION} title="Assignement" subtitle="Assignment notifications appear whenever you get assigned to a team, project, task." - imageUrl={this.props.avatarPath} + imgUrl="" + iconClasses="fa fa-newspaper-o" + iconBackground={MAIN_COLOR_BLUE} />
);