Added hidePro prop to composeForm
• Added: - hidePro prop to composeForm for optionally hiding buttons that require pro
This commit is contained in:
parent
270a3dee15
commit
3160d97b79
@ -89,7 +89,8 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
hasPoll: PropTypes.bool,
|
||||
selectedGifSrc: PropTypes.string,
|
||||
isPro: PropTypes.bool,
|
||||
};
|
||||
hidePro: PropTypes.bool,
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
showSearch: false,
|
||||
@ -247,6 +248,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
isSubmitting,
|
||||
selectedGifSrc,
|
||||
isPro,
|
||||
hidePro,
|
||||
} = this.props
|
||||
|
||||
const disabled = isSubmitting
|
||||
@ -481,11 +483,17 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
|
||||
<StatusVisibilityButton />
|
||||
<SpoilerButton />
|
||||
<SchedulePostButton />
|
||||
|
||||
<Responsive min={BREAKPOINT_EXTRA_SMALL}>
|
||||
<RichTextEditorButton />
|
||||
</Responsive>
|
||||
{
|
||||
!hidePro &&
|
||||
<SchedulePostButton />
|
||||
}
|
||||
|
||||
{
|
||||
!hidePro &&
|
||||
<Responsive min={BREAKPOINT_EXTRA_SMALL}>
|
||||
<RichTextEditorButton />
|
||||
</Responsive>
|
||||
}
|
||||
</div>
|
||||
|
||||
<Responsive min={BREAKPOINT_EXTRA_SMALL}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user