@financial-times/n-myft-ui 24.0.1 → 25.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,35 +48,35 @@
48
48
  <h2 class="demo-section__title">
49
49
  Save button
50
50
  </h2>
51
- {{> n-myft-ui/components/save-for-later/save-for-later }}
51
+ {{{renderReactComponent localPath="components/save-for-later/save-for-later" flags=@root.flags title=title contentId=contentId }}}
52
52
  {{/saveButton}}
53
53
 
54
54
  {{#saveButton}}
55
55
  <h2 class="demo-section__title">
56
56
  Unsave button
57
57
  </h2>
58
- {{> n-myft-ui/components/save-for-later/save-for-later isSaved=true }}
58
+ {{{renderReactComponent localPath="components/save-for-later/save-for-later" flags=@root.flags title=title contentId=contentId isSaved=true }}}
59
59
  {{/saveButton}}
60
60
 
61
61
  {{#saveButton}}
62
62
  <h2 class="demo-section__title">
63
63
  Save button with icon
64
64
  </h2>
65
- {{> n-myft-ui/components/save-for-later/save-for-later saveButtonWithIcon=true }}
65
+ {{{renderReactComponent localPath="components/save-for-later/save-for-later" flags=@root.flags title=title contentId=contentId saveButtonWithIcon=true }}}
66
66
  {{/saveButton}}
67
67
 
68
68
  {{#saveButton}}
69
69
  <h2 class="demo-section__title">
70
70
  Unsave button with icon
71
71
  </h2>
72
- {{> n-myft-ui/components/save-for-later/save-for-later isSaved=true saveButtonWithIcon=true }}
72
+ {{{renderReactComponent localPath="components/save-for-later/save-for-later" flags=@root.flags title=title contentId=contentId saveButtonWithIcon=true isSaved=true }}}
73
73
  {{/saveButton}}
74
74
 
75
75
  <h2 class="demo-section__title">
76
76
  Pin button
77
77
  </h2>
78
78
  {{#each pinButton}}
79
- {{> n-myft-ui/components/pin-button/pin-button }}
79
+ {{{renderReactComponent localPath="components/pin-button/pin-button" flags=@root.flags title=title id=id name=name directType=directType showPrioritiseButton=showPrioritiseButton }}}
80
80
  {{/each}}
81
81
 
82
82
  {{#instantAlert}}
@@ -449,7 +449,7 @@
449
449
 
450
450
  {{#collections}}
451
451
  <div data-o-grid-colspan="3">
452
- {{> n-myft-ui/components/collections/collections }}
452
+ {{{renderReactComponent localPath="components/collections/collections" flags=@root.flags concepts=this.concepts title=this.title liteStyle=this.liteStyle collectionName=this.collectionName trackable=this.trackable}}}
453
453
  </div>
454
454
  {{/collections}}
455
455
  </div>
@@ -471,7 +471,7 @@
471
471
 
472
472
  {{#each conceptList}}
473
473
  <div data-o-grid-colspan="3">
474
- {{> n-myft-ui/components/concept-list/concept-list }}
474
+ {{{renderReactComponent localPath="components/concept-list/concept-list" flags=@root.flags concepts=this.concepts contentType=this.contentType conceptListTitle=this.conceptListTitle trackable=this.trackable}}}
475
475
  </div>
476
476
  {{/each}}
477
477
  </div>
@@ -1,5 +1,9 @@
1
1
  import React from 'react';
2
2
  import FollowButton from '../../components/follow-button/follow-button';
3
+ import ConceptList from '../../components/concept-list/concept-list';
4
+ import Collections from '../../components/collections/collections';
5
+ import { SaveForLater } from '../../components';
6
+ import { PinButton } from '../../components';
3
7
 
4
8
  export default function Demo (props) {
5
9
 
@@ -7,9 +11,13 @@ export default function Demo (props) {
7
11
  title,
8
12
  flags,
9
13
  followButton,
14
+ conceptList,
15
+ collections,
16
+ saveButton,
17
+ pinButton
10
18
  } = props;
11
19
 
12
- const followButtonProps = {...followButton, flags};
20
+ const followButtonProps = { ...followButton, flags };
13
21
 
14
22
  return (
15
23
  <div className="o-grid-container o-grid-container--snappy demo-container">
@@ -25,9 +33,93 @@ export default function Demo (props) {
25
33
  Follow button
26
34
  </h2>
27
35
  <FollowButton {...followButtonProps} />
36
+
37
+
38
+ <h2
39
+ className="demo-section__title">
40
+ x-dash follow button
41
+ </h2>
42
+
43
+ <FollowButton {...followButtonProps} buttonText={followButton.name} />
44
+
45
+
46
+ <h2 className="demo-section__title">
47
+ Save button
48
+ </h2>
49
+ <SaveForLater flags={flags} {...saveButton} />
50
+
51
+ <h2 className="demo-section__title">
52
+ Unsave button
53
+ </h2>
54
+ <SaveForLater flags={flags} {...saveButton} isSaved={true} />
55
+
56
+ <h2 className="demo-section__title">
57
+ Unsave button with icon
58
+ </h2>
59
+ <SaveForLater flags={flags} {...saveButton} saveButtonWithIcon={true} />
60
+
61
+ <h2 className="demo-section__title">
62
+ Save button with icon
63
+ </h2>
64
+ <SaveForLater flags={flags} {...saveButton} isSaved={true} saveButtonWithIcon={true} />
65
+
66
+ <h2 className="demo-section__title">
67
+ Pin button
68
+ </h2>
69
+
70
+ {pinButton.map((item, index) => <PinButton key={index} {...item}/>)}
71
+
72
+ </div>
73
+ </div>
74
+ </section>
75
+
76
+ <section
77
+ id="topic-list"
78
+ className="demo-section">
79
+ <div className="o-grid-row">
80
+ <div data-o-grid-colspan="12">
81
+ <h2 className="demo-section__title">
82
+ Topic list
83
+ </h2>
84
+
85
+ <p className="demo-section__description">
86
+ A list of topics to follow
87
+ </p>
88
+ </div>
89
+
90
+ {
91
+ conceptList && conceptList.map((list, index) =>
92
+ <div key={index} data-o-grid-colspan="3">
93
+ <ConceptList {...list} flags={flags} />
94
+ </div>)
95
+ }
96
+
97
+ </div>
98
+ </section>
99
+
100
+ <section
101
+ id="collections"
102
+ className="demo-section">
103
+ <div className="o-grid-row">
104
+ <div data-o-grid-colspan="12">
105
+ <h2 className="demo-section__title">
106
+ Collections
107
+ </h2>
108
+
109
+ <p className="demo-section__description">
110
+ Curated collections of topics to follow.
111
+ </p>
28
112
  </div>
113
+
114
+ {collections.map((collection, index) => (
115
+ <div key={index} data-o-grid-colspan="3">
116
+ <Collections {...collection} flags={flags} />
117
+ </div>
118
+ ))}
119
+
29
120
  </div>
30
121
  </section>
122
+
31
123
  </div>
32
124
  )
33
125
  }