aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/FeatureList.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ui/FeatureList.js')
-rw-r--r--src/components/ui/FeatureList.js44
1 files changed, 21 insertions, 23 deletions
diff --git a/src/components/ui/FeatureList.js b/src/components/ui/FeatureList.js
index cf2664830..14e7ec3c4 100644
--- a/src/components/ui/FeatureList.js
+++ b/src/components/ui/FeatureList.js
@@ -1,53 +1,53 @@
1import React, { Component } from 'react'; 1import React, { Component } from 'react';
2import PropTypes from 'prop-types'; 2import PropTypes from 'prop-types';
3import { defineMessages, intlShape } from 'react-intl'; 3import { defineMessages, injectIntl } from 'react-intl';
4 4
5import { FeatureItem } from './FeatureItem'; 5import { FeatureItem } from './FeatureItem';
6 6
7const messages = defineMessages({ 7const messages = defineMessages({
8 availableRecipes: { 8 availableRecipes: {
9 id: 'pricing.features.recipes', 9 id: 'pricing.features.recipes',
10 defaultMessage: '!!!Choose from more than 70 Services', // TODO: Make this dynamic 10 defaultMessage: 'Choose from more than 70 Services', // TODO: Make this dynamic
11 }, 11 },
12 accountSync: { 12 accountSync: {
13 id: 'pricing.features.accountSync', 13 id: 'pricing.features.accountSync',
14 defaultMessage: '!!!Account Synchronisation', 14 defaultMessage: 'Account Synchronisation',
15 }, 15 },
16 desktopNotifications: { 16 desktopNotifications: {
17 id: 'pricing.features.desktopNotifications', 17 id: 'pricing.features.desktopNotifications',
18 defaultMessage: '!!!Desktop Notifications', 18 defaultMessage: 'Desktop Notifications',
19 }, 19 },
20 unlimitedServices: { 20 unlimitedServices: {
21 id: 'pricing.features.unlimitedServices', 21 id: 'pricing.features.unlimitedServices',
22 defaultMessage: '!!!Add unlimited services', 22 defaultMessage: 'Add unlimited services',
23 }, 23 },
24 spellchecker: { 24 spellchecker: {
25 id: 'pricing.features.spellchecker', 25 id: 'pricing.features.spellchecker',
26 defaultMessage: '!!!Spellchecker support', 26 defaultMessage: 'Spellchecker support',
27 }, 27 },
28 workspaces: { 28 workspaces: {
29 id: 'pricing.features.workspaces', 29 id: 'pricing.features.workspaces',
30 defaultMessage: '!!!Workspaces', 30 defaultMessage: 'Workspaces',
31 }, 31 },
32 customWebsites: { 32 customWebsites: {
33 id: 'pricing.features.customWebsites', 33 id: 'pricing.features.customWebsites',
34 defaultMessage: '!!!Add Custom Websites', 34 defaultMessage: 'Add Custom Websites',
35 }, 35 },
36 onPremise: { 36 onPremise: {
37 id: 'pricing.features.onPremise', 37 id: 'pricing.features.onPremise',
38 defaultMessage: '!!!On-premise & other Hosted Services', 38 defaultMessage: 'On-premise & other Hosted Services',
39 }, 39 },
40 thirdPartyServices: { 40 thirdPartyServices: {
41 id: 'pricing.features.thirdPartyServices', 41 id: 'pricing.features.thirdPartyServices',
42 defaultMessage: '!!!Install 3rd party services', 42 defaultMessage: 'Install 3rd party services',
43 }, 43 },
44 serviceProxies: { 44 serviceProxies: {
45 id: 'pricing.features.serviceProxies', 45 id: 'pricing.features.serviceProxies',
46 defaultMessage: '!!!Service Proxies', 46 defaultMessage: 'Service Proxies',
47 }, 47 },
48 teamManagement: { 48 teamManagement: {
49 id: 'pricing.features.teamManagement', 49 id: 'pricing.features.teamManagement',
50 defaultMessage: '!!!Team Management', 50 defaultMessage: 'Team Management',
51 }, 51 },
52}); 52});
53 53
@@ -60,18 +60,11 @@ export class FeatureList extends Component {
60 static defaultProps = { 60 static defaultProps = {
61 className: '', 61 className: '',
62 featureClassName: '', 62 featureClassName: '',
63 }
64
65 static contextTypes = {
66 intl: intlShape,
67 }; 63 };
68 64
69 render() { 65 render() {
70 const { 66 const { className, featureClassName } = this.props;
71 className, 67 const { intl } = this.props;
72 featureClassName,
73 } = this.props;
74 const { intl } = this.context;
75 68
76 const features = [ 69 const features = [
77 messages.availableRecipes, 70 messages.availableRecipes,
@@ -92,10 +85,15 @@ export class FeatureList extends Component {
92 85
93 return ( 86 return (
94 <ul className={className}> 87 <ul className={className}>
95 {features.map((feature) => <FeatureItem name={intl.formatMessage(feature)} className={featureClassName} />)} 88 {features.map(feature => (
89 <FeatureItem
90 name={intl.formatMessage(feature)}
91 className={featureClassName}
92 />
93 ))}
96 </ul> 94 </ul>
97 ); 95 );
98 } 96 }
99} 97}
100 98
101export default FeatureList; 99export default injectIntl(FeatureList);