diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-05-25 21:27:00 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-06-13 22:15:31 +0200 |
commit | d99a661f08398238838bf576e86c4be706ee7aa0 (patch) | |
tree | 2afbd2b0a7f4dd61876896186956abea78ea7ae4 /app/javascript/flavours/glitch/features/ui/components/notifications_counter_icon.js | |
parent | 0bd9f23e6d2599a3d3930b6456024a4e3c9a3535 (diff) |
[Glitch] Add responsive panels to the single-column layout
Port 1e5532e693d9533ee37f553aeb191e284178fa52 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components/notifications_counter_icon.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/notifications_counter_icon.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/notifications_counter_icon.js b/app/javascript/flavours/glitch/features/ui/components/notifications_counter_icon.js index 137658b94..25df35264 100644 --- a/app/javascript/flavours/glitch/features/ui/components/notifications_counter_icon.js +++ b/app/javascript/flavours/glitch/features/ui/components/notifications_counter_icon.js @@ -10,15 +10,17 @@ const mapStateToProps = state => ({ const formatNumber = num => num > 99 ? '99+' : num; -const NotificationsCounterIcon = ({ count, showBadge }) => ( +const NotificationsCounterIcon = ({ count, className, showBadge }) => ( <i className='icon-with-badge'> - <Icon icon='bell' fixedWidth /> + <Icon icon='bell' fixedWidth className={className} /> {showBadge && count > 0 && <i className='icon-with-badge__badge'>{formatNumber(count)}</i>} </i> ); NotificationsCounterIcon.propTypes = { count: PropTypes.number.isRequired, + showBadge: PropTypes.bool, + className: PropTypes.string, }; export default connect(mapStateToProps)(NotificationsCounterIcon); |