Skip to content

Commit

Permalink
NCRS-3363: tried removing string
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-bell committed Dec 17, 2024
1 parent 17541f0 commit eec09e0
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/components/masked-input/MaskedInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ import { InputWidth } from 'nhsuk-react-components/dist/esm/util/types/NHSUKType

import FormGroup from './LocalFormGroup';

import InputMask, { ReactInputMask } from 'react-input-mask';
// import InputMask, { ReactInputMask } from 'react-input-mask';
import InputMask from 'react-input-mask';

import classNames from 'classnames';

type InputMaskRef =
| string
| ((instance: ReactInputMask | null) => void)
| React.RefObject<ReactInputMask>
| null;
// type InputMaskRef =
// | string
// | ((instance: ReactInputMask | null) => void)
// | React.RefObject<ReactInputMask>
// | null;

type MaskedInputProps = HTMLProps<HTMLInputElement> &
FormElementProps & {
Expand All @@ -24,15 +25,13 @@ FormElementProps & {
formatChars?: { [character: string]: string };
alwaysShowMask?: boolean;
inputRef?: (instance: HTMLInputElement | null) => any;
ref?: InputMaskRef;
refs?: {
[key: string]: ReactInstance;
};
// ref?: InputMaskRef;
};

const MaskedInput: React.FC<MaskedInputProps> = props => (
<FormGroup<MaskedInputProps> inputType="input" {...props}>
{({ className, width, error, ref, refs, ...rest }:any) => (
{/* {({ className, width, error, ref, ...rest }:any) => ( */}
{({ className, width, error, ...rest }:any) => (
<InputMask
className={classNames(
'nhsuk-input',
Expand Down

0 comments on commit eec09e0

Please sign in to comment.