added RTL support

This commit is contained in:
adueck
2024-08-24 18:08:09 -05:00
committed by Umputun
parent 88bf4b7d70
commit 0bc85a6ff6
4 changed files with 7 additions and 2 deletions
@@ -334,6 +334,7 @@ export function Auth() {
const element = evt.target as HTMLInputElement;
element.value = element.value.trim();
}}
dir="auto"
/>
</div>
{view === 'email' && (
@@ -345,6 +346,7 @@ export function Auth() {
type="email"
placeholder={intl.formatMessage(messages.emailAddress)}
disabled={isLoading}
dir="auto"
/>
</div>
)}
@@ -461,6 +461,7 @@ export class CommentForm extends Component<Props, State> {
disabled={isDisabled}
autofocus={!!autofocus}
spellcheck={true}
dir="auto"
/>
</TextExpander>
{charactersLeft < 100 && <span className="comment-form__counter">{charactersLeft}</span>}
@@ -518,6 +519,7 @@ export class CommentForm extends Component<Props, State> {
className="comment-form__preview raw-content"
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: preview }}
dir="auto"
/>
</div>
)
@@ -336,7 +336,7 @@ export class Comment extends Component<CommentProps, State> {
if (props.view === 'preview') {
return (
<article className={b('comment', { mix: props.mix }, defaultMods)}>
<div className="comment__body">
<div className="comment__body" dir="auto">
{!!o.title && (
<div className="comment__title">
<a className="comment__title-link" href={`${o.locator.url}#${COMMENT_NODE_CLASSNAME_PREFIX}${o.id}`}>
@@ -477,6 +477,7 @@ export class Comment extends Component<CommentProps, State> {
ref={this.textNode}
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: o.text }}
dir="auto"
/>
)}
@@ -33,5 +33,5 @@ export const TextareaAutosize = forwardRef<HTMLTextAreaElement, Props>(({ onInpu
}
}, [value, ref]);
return <textarea {...props} data-testid={props.id} onInput={handleInput} value={value} ref={ref} />;
return <textarea {...props} data-testid={props.id} onInput={handleInput} value={value} ref={ref} dir="auto" />;
});