From 4c762972ab51e6017607f0450c2647f4c0e5660f Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Wed, 10 Apr 2019 16:27:44 +0200 Subject: add premium badge to workspace drawer headline --- .../workspaces/components/WorkspaceDrawer.js | 49 ++++++++++++++-------- 1 file changed, 32 insertions(+), 17 deletions(-) (limited to 'src/features') diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js index d48b55f12..64c98dc63 100644 --- a/src/features/workspaces/components/WorkspaceDrawer.js +++ b/src/features/workspaces/components/WorkspaceDrawer.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { observer } from 'mobx-react'; import injectSheet from 'react-jss'; import { defineMessages, FormattedHTMLMessage, intlShape } from 'react-intl'; -import { H1, Icon } from '@meetfranz/ui'; +import { H1, Icon, ProBadge } from '@meetfranz/ui'; import { Button } from '@meetfranz/forms/lib'; import ReactTooltip from 'react-tooltip'; @@ -41,6 +41,10 @@ const messages = defineMessages({ id: 'workspaceDrawer.addNewWorkspaceLabel', defaultMessage: '!!!add new workspace', }, + premiumFeatureBadge: { + id: 'workspaceDrawer.proFeatureBadge', + defaultMessage: '!!!Premium feature', + }, }); const styles = theme => ({ @@ -54,6 +58,9 @@ const styles = theme => ({ marginBottom: '25px', marginLeft: theme.workspaces.drawer.padding, }, + headlineProBadge: { + marginRight: 15, + }, workspacesSettingsButton: { float: 'right', marginRight: theme.workspaces.drawer.padding, @@ -134,6 +141,14 @@ class WorkspaceDrawer extends Component { return (

+ {workspaceStore.isPremiumUpgradeRequired && ( + + + + )} {intl.formatMessage(messages.headline)} ))} +
{ + workspaceActions.openWorkspaceSettings(); + gaEvent(GA_CATEGORY_WORKSPACES, 'add', 'drawerAddLabel'); + }} + > + + + {intl.formatMessage(messages.addNewWorkspaceLabel)} + +

)} -
{ - workspaceActions.openWorkspaceSettings(); - gaEvent(GA_CATEGORY_WORKSPACES, 'add', 'drawerAddLabel'); - }} - > - - - {intl.formatMessage(messages.addNewWorkspaceLabel)} - -
); -- cgit v1.2.3-70-g09d2