import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { length } from 'stringz'; import ProgressCircle from 'soapbox/components/progress-circle'; const messages = defineMessages({ title: { id: 'compose.character_counter.title', defaultMessage: 'Used {chars} out of {maxChars} characters' }, }); interface IVisualCharacterCounter { /** max text allowed */ max: number, /** text to use to measure */ text: string, } /** Renders a character counter */ const VisualCharacterCounter: React.FC = ({ text, max }) => { const intl = useIntl(); const textLength = length(text); const progress = textLength / max; return ( ); }; export default VisualCharacterCounter;