Skip to content

Commit

Permalink
feat(InputNew): exported and changeset added
Browse files Browse the repository at this point in the history
  • Loading branch information
billgil committed Nov 10, 2022
1 parent f274d6a commit 2786693
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/silly-students-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@web3uikit/core': patch
---

added InputNew
2 changes: 1 addition & 1 deletion packages/core/src/lib/InputNew/index.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default as Input } from './Input';
export { default as InputNew } from './Input';
export type { IInputProps } from './types';
16 changes: 13 additions & 3 deletions packages/core/src/lib/InputNew/tests/Inpup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ test('Input blur event', () => {
render(
<InputDefault
autoFocus={true}
onBlur={(e) => testBlurEvent(e.target.value)}
onBlur={(e: React.FocusEvent<HTMLInputElement>) =>
testBlurEvent(e.target.value)
}
/>,
);
});
Expand All @@ -57,7 +59,11 @@ test('Input blur event', () => {
test('Input change event', () => {
act(() => {
render(
<InputDefault onChange={(e) => testChangeEvent(e.target.value)} />,
<InputDefault
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
testChangeEvent(e.target.value)
}
/>,
);
});
const element: HTMLDivElement = screen.getByTestId(inputWrapDivId);
Expand All @@ -71,7 +77,11 @@ test('Input change event', () => {
test('Input focus event', () => {
act(() => {
render(
<InputDefault onFocus={(e) => testFocusEvent(e.target.value)} />,
<InputDefault
onFocus={(e: React.FocusEvent<HTMLInputElement>) =>
testFocusEvent(e.target.value)
}
/>,
);
});
const element: HTMLDivElement = screen.getByTestId(inputWrapDivId);
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export * from './HideButton';
export * from './Illustrations';
export * from './Info';
export * from './Input';
export * from './InputNew';
export * from './LinkTo';
export * from './Loading';
export * from './Logo';
Expand Down

0 comments on commit 2786693

Please sign in to comment.