Add help tip notice to input
This commit is contained in:
parent
83a535928d
commit
6bb7a155cd
4 changed files with 30 additions and 2 deletions
|
@ -42,7 +42,7 @@ export const HelpText = (helpTextProps: HelpTextProps) => {
|
||||||
{deletedComment && <div className="error__text">{__('This comment has been deleted.')}</div>}
|
{deletedComment && <div className="error__text">{__('This comment has been deleted.')}</div>}
|
||||||
|
|
||||||
{!!minAmount && (
|
{!!minAmount && (
|
||||||
<div className="help--notice commentCreate__minAmountNotice">
|
<div className="help--notice comment-create__min-amount-notice">
|
||||||
<I18nMessage tokens={{ lbc: <CreditAmount noFormat amount={minAmount} /> }}>
|
<I18nMessage tokens={{ lbc: <CreditAmount noFormat amount={minAmount} /> }}>
|
||||||
{minTip ? 'Comment min: %lbc%' : minSuper ? 'HyperChat min: %lbc%' : ''}
|
{minTip ? 'Comment min: %lbc%' : minSuper ? 'HyperChat min: %lbc%' : ''}
|
||||||
</I18nMessage>
|
</I18nMessage>
|
||||||
|
|
|
@ -533,6 +533,11 @@ export function CommentCreate(props: Props) {
|
||||||
disabled={isFetchingChannels || disableInput}
|
disabled={isFetchingChannels || disableInput}
|
||||||
isLivestream={isLivestream}
|
isLivestream={isLivestream}
|
||||||
label={<FormChannelSelector isReply={Boolean(isReply)} isLivestream={Boolean(isLivestream)} />}
|
label={<FormChannelSelector isReply={Boolean(isReply)} isLivestream={Boolean(isLivestream)} />}
|
||||||
|
noticeLabel={
|
||||||
|
isMobile && (
|
||||||
|
<HelpText deletedComment={deletedComment} minAmount={minAmount} minSuper={minSuper} minTip={minTip} />
|
||||||
|
)
|
||||||
|
}
|
||||||
name={isReply ? 'create__reply' : 'create__comment'}
|
name={isReply ? 'create__reply' : 'create__comment'}
|
||||||
onChange={(e) => setCommentValue(SIMPLE_SITE || !advancedEditor || isReply ? e.target.value : e)}
|
onChange={(e) => setCommentValue(SIMPLE_SITE || !advancedEditor || isReply ? e.target.value : e)}
|
||||||
handleTip={(isLBC) => handleSelectTipComment(isLBC ? TAB_LBC : TAB_FIAT)}
|
handleTip={(isLBC) => handleSelectTipComment(isLBC ? TAB_LBC : TAB_FIAT)}
|
||||||
|
@ -574,7 +579,7 @@ export function CommentCreate(props: Props) {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(!isMobile || !isLivestream || isReviewingStickerComment || isReviewingSupportComment) && (
|
{(!isMobile || isReviewingStickerComment || isReviewingSupportComment) && (
|
||||||
<div className="section__actions">
|
<div className="section__actions">
|
||||||
{/* Submit Button */}
|
{/* Submit Button */}
|
||||||
{isReviewingSupportComment ? (
|
{isReviewingSupportComment ? (
|
||||||
|
|
|
@ -49,6 +49,7 @@ type Props = {
|
||||||
showSelectors?: boolean,
|
showSelectors?: boolean,
|
||||||
submitButtonRef?: any,
|
submitButtonRef?: any,
|
||||||
tipModalOpen?: boolean,
|
tipModalOpen?: boolean,
|
||||||
|
noticeLabel?: any,
|
||||||
onChange?: (any) => any,
|
onChange?: (any) => any,
|
||||||
setShowSelectors?: (boolean) => void,
|
setShowSelectors?: (boolean) => void,
|
||||||
quickActionHandler?: (any) => any,
|
quickActionHandler?: (any) => any,
|
||||||
|
@ -117,6 +118,7 @@ export class FormField extends React.PureComponent<Props, State> {
|
||||||
showSelectors,
|
showSelectors,
|
||||||
submitButtonRef,
|
submitButtonRef,
|
||||||
tipModalOpen,
|
tipModalOpen,
|
||||||
|
noticeLabel,
|
||||||
quickActionHandler,
|
quickActionHandler,
|
||||||
setShowSelectors,
|
setShowSelectors,
|
||||||
render,
|
render,
|
||||||
|
@ -282,6 +284,8 @@ export class FormField extends React.PureComponent<Props, State> {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{noticeLabel}
|
||||||
|
|
||||||
{hideSuggestions ? (
|
{hideSuggestions ? (
|
||||||
<textarea
|
<textarea
|
||||||
type={type}
|
type={type}
|
||||||
|
|
|
@ -45,6 +45,12 @@
|
||||||
.MuiOutlinedInput-root {
|
.MuiOutlinedInput-root {
|
||||||
padding: 0px var(--spacing-xxs) !important;
|
padding: 0px var(--spacing-xxs) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-small) {
|
||||||
|
.MuiOutlinedInput-notchedOutline {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $breakpoint-small) {
|
@media (min-width: $breakpoint-small) {
|
||||||
|
@ -53,6 +59,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.MuiDrawer-root {
|
||||||
|
.comment-create__min-amount-notice {
|
||||||
|
margin: 0px;
|
||||||
|
padding: var(--spacing-xxs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card--enable-overflow {
|
||||||
|
.comment-create__min-amount-notice {
|
||||||
|
margin-bottom: var(--spacing-xxs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.comment-create--drawer .MuiOutlinedInput-notchedOutline {
|
.comment-create--drawer .MuiOutlinedInput-notchedOutline {
|
||||||
border: 1px solid var(--color-border) !important;
|
border: 1px solid var(--color-border) !important;
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
|
|
Loading…
Add table
Reference in a new issue