@govuk-frederic/countdown-text-area

0.2.0 • Public • Published

CountdownTextArea

Import

  import CountdownTextArea from '@govuk-frederic/countdown-text-area';

Usage

Simple

import manageState from 'manage-state';

const ManagedCountdownTextarea = manageState(CountdownTextArea, {
 changeEvent: true,
 propsToState: ['value'],
});

<ManagedCountdownTextarea />

With maxlength (150)

import manageState from 'manage-state';

const ManagedCountdownTextarea = manageState(CountdownTextArea, {
 changeEvent: true,
 propsToState: ['value'],
});

<ManagedCountdownTextarea noMaxLengthAttr maxLength={150} />

With maxlength (100) and positiveOnly

import manageState from 'manage-state';

const ManagedCountdownTextarea = manageState(CountdownTextArea, {
 changeEvent: true,
 propsToState: ['value'],
});

<ManagedCountdownTextarea maxLength={100} positiveOnly />

Properties

Prop Required Default Type Description
maxLength undefined number
noMaxLengthAttr false bool
positiveOnly false bool

Readme

Keywords

none

Package Sidebar

Install

npm i @govuk-frederic/countdown-text-area

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

70.9 kB

Total Files

18

Last publish

Collaborators

  • loque-
  • penx
  • petelockey
  • steve_sims