Skip to content

Commit

Permalink
fix: further react-gears update
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-aiello-appfolio committed Jan 2, 2024
1 parent ee3f261 commit 36e80bf
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/components/Input/MaskedInput.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import React, { FC } from 'react';
import MaskedInputBase, { MaskedInputProps as RTMaskedInputProps } from 'react-text-mask';
import MaskedInputBase, { MaskedInputProps } from 'react-text-mask';

interface MaskedInputProps extends RTMaskedInputProps {
'data-testid'?: string;
}
const MaskedInput: FC<MaskedInputProps> = ({ guide = false, ...props }) => (
<MaskedInputBase className="form-control" guide={guide} {...props} />
);

const MaskedInput: FC<MaskedInputProps> = ({ guide = false, ...props }) => {
if (props && !props['data-testid']) {
props['data-testid'] = 'react-gears-maskedinput';
}
return <MaskedInputBase className="form-control" guide={guide} {...props} />;
};
export default MaskedInput;

0 comments on commit 36e80bf

Please sign in to comment.