UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

17 lines (12 loc) 315 B
/** * MSKCC 2021, 2024 */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function useAnnouncer(textCount, maxCount) { const lastTen = maxCount - 10; if (textCount >= lastTen) { return `${maxCount - textCount} characters left.`; } } exports.useAnnouncer = useAnnouncer;