diff --git a/js/src/forum/components/Poll.tsx b/js/src/forum/components/Poll.tsx index ad3684b5..795f357a 100644 --- a/js/src/forum/components/Poll.tsx +++ b/js/src/forum/components/Poll.tsx @@ -14,8 +14,8 @@ export default class IndexPolls extends Component {
- - + +
Privacy setting diff --git a/js/src/forum/components/Poll/PollDescription.tsx b/js/src/forum/components/Poll/PollDescription.tsx index 47327798..2c93efef 100644 --- a/js/src/forum/components/Poll/PollDescription.tsx +++ b/js/src/forum/components/Poll/PollDescription.tsx @@ -1,12 +1,12 @@ import * as Mithril from 'mithril'; -import Component from 'flarum/common/Component'; +import Component, { ComponentAttrs } from 'flarum/common/Component'; -export default class PollDescription extends Component { +interface PollDescriptionAttrs extends ComponentAttrs { + text: String; +} + +export default class PollDescription extends Component { view(): Mithril.Children { - return ( - <> -

Lorem Ipsum Dolor Sit amet Consectetur Adipiscing Elit Sit

- - ); + return

{this.attrs.text}

; } } diff --git a/js/src/forum/components/Poll/PollOption.tsx b/js/src/forum/components/Poll/PollOption.tsx index 99f50eef..b3b4a118 100644 --- a/js/src/forum/components/Poll/PollOption.tsx +++ b/js/src/forum/components/Poll/PollOption.tsx @@ -16,8 +16,8 @@ export default class PollOption extends Component { aria-describedby="privacy-setting-1-description" /> - - + + ); diff --git a/js/src/forum/components/Poll/PollOptionDescription.tsx b/js/src/forum/components/Poll/PollOptionDescription.tsx index 5b6591b8..a0815339 100644 --- a/js/src/forum/components/Poll/PollOptionDescription.tsx +++ b/js/src/forum/components/Poll/PollOptionDescription.tsx @@ -1,11 +1,15 @@ import * as Mithril from 'mithril'; -import Component from 'flarum/common/Component'; +import Component, { ComponentAttrs } from 'flarum/common/Component'; -export default class PollOptionDescription extends Component { +interface PollOptionDescriptionAttrs extends ComponentAttrs { + text: String; +} + +export default class PollOptionDescription extends Component { view(): Mithril.Children { return ( - Only members of this project would be able to access 3 + {this.attrs.text} ); } diff --git a/js/src/forum/components/Poll/PollOptionLabel.tsx b/js/src/forum/components/Poll/PollOptionLabel.tsx index 05d78404..8cc5a526 100644 --- a/js/src/forum/components/Poll/PollOptionLabel.tsx +++ b/js/src/forum/components/Poll/PollOptionLabel.tsx @@ -1,11 +1,15 @@ import * as Mithril from 'mithril'; -import Component from 'flarum/common/Component'; +import Component, { ComponentAttrs } from 'flarum/common/Component'; -export default class PollOptionLabel extends Component { +interface PollOptionLabelAttrs extends ComponentAttrs { + text: String; +} + +export default class PollOptionLabel extends Component { view(): Mithril.Children { return ( - Private to Project Members test 23 + {this.attrs.text} ); } diff --git a/js/src/forum/components/Poll/PollTitle.tsx b/js/src/forum/components/Poll/PollTitle.tsx index b2848f3d..690457e1 100644 --- a/js/src/forum/components/Poll/PollTitle.tsx +++ b/js/src/forum/components/Poll/PollTitle.tsx @@ -1,12 +1,12 @@ import * as Mithril from 'mithril'; -import Component from 'flarum/common/Component'; +import Component, { ComponentAttrs } from 'flarum/common/Component'; -export default class PollTitle extends Component { +interface PollTitleAttrs extends ComponentAttrs { + text: String; +} + +export default class PollTitle extends Component { view(): Mithril.Children { - return ( - <> -

Polls Title

- - ); + return

{this.attrs.text}

; } }