Remove the 'warning color' from the character counter
This commit is contained in:
parent
490a3bb751
commit
8723b51693
1 changed files with 1 additions and 7 deletions
|
@ -25,7 +25,6 @@ import {s, colors, gradients} from '../../lib/styles'
|
||||||
import {detectLinkables} from '../../../lib/strings'
|
import {detectLinkables} from '../../../lib/strings'
|
||||||
|
|
||||||
const MAX_TEXT_LENGTH = 256
|
const MAX_TEXT_LENGTH = 256
|
||||||
const WARNING_TEXT_LENGTH = 200
|
|
||||||
const DANGER_TEXT_LENGTH = MAX_TEXT_LENGTH
|
const DANGER_TEXT_LENGTH = MAX_TEXT_LENGTH
|
||||||
|
|
||||||
export const ComposePost = observer(function ComposePost({
|
export const ComposePost = observer(function ComposePost({
|
||||||
|
@ -121,12 +120,7 @@ export const ComposePost = observer(function ComposePost({
|
||||||
}
|
}
|
||||||
|
|
||||||
const canPost = text.length <= MAX_TEXT_LENGTH
|
const canPost = text.length <= MAX_TEXT_LENGTH
|
||||||
const progressColor =
|
const progressColor = text.length > DANGER_TEXT_LENGTH ? '#e60000' : undefined
|
||||||
text.length > DANGER_TEXT_LENGTH
|
|
||||||
? '#e60000'
|
|
||||||
: text.length > WARNING_TEXT_LENGTH
|
|
||||||
? '#f7c600'
|
|
||||||
: undefined
|
|
||||||
|
|
||||||
const textDecorated = useMemo(() => {
|
const textDecorated = useMemo(() => {
|
||||||
let i = 0
|
let i = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue