UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

13 lines (10 loc) 224 B
/** * MSKCC 2021, 2024 */ function useAnnouncer(textCount, maxCount) { const lastTen = maxCount - 10; if (textCount >= lastTen) { return `${maxCount - textCount} characters left.`; } } export { useAnnouncer };