style: optimize Input.TextArea count style in rtl (#27098)

This commit is contained in:
xrk 2020-10-12 12:43:04 +08:00 committed by GitHub
parent 852b28c235
commit f0f39895b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View File

@ -111,6 +111,7 @@ class TextArea extends React.Component<TextAreaProps, TextAreaState> {
<div <div
className={classNames(`${prefixCls}-textarea`, { className={classNames(`${prefixCls}-textarea`, {
[`${prefixCls}-textarea-show-count`]: showCount, [`${prefixCls}-textarea-show-count`]: showCount,
[`${prefixCls}-textarea-rtl`]: direction === 'rtl',
})} })}
{...(showCount ? { 'data-count': dataCount } : {})} {...(showCount ? { 'data-count': dataCount } : {})}
> >

View File

@ -47,7 +47,7 @@
&-textarea { &-textarea {
&-show-count::after { &-show-count::after {
display: block; display: block;
color: @normal-color; color: @text-color-secondary;
text-align: right; text-align: right;
content: attr(data-count); content: attr(data-count);
} }

View File

@ -33,6 +33,16 @@
margin: 0 @input-affix-margin 0 0; margin: 0 @input-affix-margin 0 0;
} }
} }
&-textarea {
&-rtl {
direction: rtl;
}
&-rtl&-show-count::after {
text-align: left;
}
}
} }
// allow-clear // allow-clear