From 27866932cece569c63b3430a8a1eeb95de1e74fb Mon Sep 17 00:00:00 2001 From: billgil Date: Thu, 10 Nov 2022 17:12:13 +0100 Subject: [PATCH] feat(InputNew): exported and changeset added --- .changeset/silly-students-explain.md | 5 +++++ packages/core/src/lib/InputNew/index.tsx | 2 +- .../core/src/lib/InputNew/tests/Inpup.test.tsx | 16 +++++++++++++--- packages/core/src/lib/index.ts | 1 + 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .changeset/silly-students-explain.md diff --git a/.changeset/silly-students-explain.md b/.changeset/silly-students-explain.md new file mode 100644 index 000000000..b8cd1a94a --- /dev/null +++ b/.changeset/silly-students-explain.md @@ -0,0 +1,5 @@ +--- +'@web3uikit/core': patch +--- + +added InputNew diff --git a/packages/core/src/lib/InputNew/index.tsx b/packages/core/src/lib/InputNew/index.tsx index 9547763cb..3721bfc1d 100644 --- a/packages/core/src/lib/InputNew/index.tsx +++ b/packages/core/src/lib/InputNew/index.tsx @@ -1,2 +1,2 @@ -export { default as Input } from './Input'; +export { default as InputNew } from './Input'; export type { IInputProps } from './types'; diff --git a/packages/core/src/lib/InputNew/tests/Inpup.test.tsx b/packages/core/src/lib/InputNew/tests/Inpup.test.tsx index 476b23277..7d3b6ce64 100644 --- a/packages/core/src/lib/InputNew/tests/Inpup.test.tsx +++ b/packages/core/src/lib/InputNew/tests/Inpup.test.tsx @@ -43,7 +43,9 @@ test('Input blur event', () => { render( testBlurEvent(e.target.value)} + onBlur={(e: React.FocusEvent) => + testBlurEvent(e.target.value) + } />, ); }); @@ -57,7 +59,11 @@ test('Input blur event', () => { test('Input change event', () => { act(() => { render( - testChangeEvent(e.target.value)} />, + ) => + testChangeEvent(e.target.value) + } + />, ); }); const element: HTMLDivElement = screen.getByTestId(inputWrapDivId); @@ -71,7 +77,11 @@ test('Input change event', () => { test('Input focus event', () => { act(() => { render( - testFocusEvent(e.target.value)} />, + ) => + testFocusEvent(e.target.value) + } + />, ); }); const element: HTMLDivElement = screen.getByTestId(inputWrapDivId); diff --git a/packages/core/src/lib/index.ts b/packages/core/src/lib/index.ts index c7a89b2ea..66098da21 100644 --- a/packages/core/src/lib/index.ts +++ b/packages/core/src/lib/index.ts @@ -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';