Skip to content

Commit 0623692

Browse files
author
Kubit
committed
Fix typescript and eslint errors
1 parent 3efdd09 commit 0623692

File tree

7 files changed

+27
-4
lines changed

7 files changed

+27
-4
lines changed

src/assets/storybook/videos/videos.ts

Whitespace-only changes.

src/components/carousel/carousel.styled.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export const ArrowRightIconContainer = styled.div<{
161161
getStyles(styles[CarouselArrowStateType.DEFAULT]?.arrowRightIconButtonContainer)};
162162
&:focus {
163163
${props =>
164-
getStyles(props.styles[CarouselArrowStateType.DEFAULT]?.arrowLeftIconButtonContainer)}
164+
getStyles(props.styles[CarouselArrowStateType.DEFAULT]?.arrowRightIconButtonContainer)}
165165
}
166166
&:hover {
167167
${props =>

src/components/drawer/drawerStandAlone.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import React from 'react';
23

34
import { Footer } from '@/components/footer/footer';
@@ -54,7 +55,6 @@ const DrawerStandAloneComponent = (
5455
<DrawerTitleContentFooterContainerStyled blocked={blocked} styles={props.styles}>
5556
<DrawerTitleStyled
5657
data-drawer-title
57-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5858
as={Text as any}
5959
component={titleComponent as unknown as TextComponentType}
6060
customTypography={props.styles.title}
@@ -80,7 +80,6 @@ const DrawerStandAloneComponent = (
8080
{props.footer?.content && (props.styles.footer?.variant || props.footer.variant) && (
8181
<DrawerFooterStyled
8282
data-drawer-footer
83-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
8483
as={Footer as any}
8584
customFooterStyles={props.styles}
8685
variant={props.styles.footer?.variant}

src/components/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export * from './tableV2';
8585
export * from './dataTable';
8686
export * from './video';
8787
export * from './progressBar';
88+
8889
export * from './virtualKeyboard';
8990

9091
/**
@@ -110,6 +111,7 @@ export * from './headerStructure';
110111
export * from './footer';
111112
export * from './portal';
112113
export * from './textCount';
114+
113115
export * from './operativeLayout';
114116
export * from './emptyState';
115117
export * from './loadingState';

src/components/inputCurrency/stories/inputCurrency.stories.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { Meta, StoryObj } from '@storybook/react';
2+
import React from 'react';
23

4+
import { Button } from '@/components/button/button';
35
import {
46
additionalInfoAction,
57
labelSecondary,
@@ -25,12 +27,29 @@ const meta = {
2527
figmaUrl:
2628
'https://www.figma.com/file/EYQkbENTFO5r8muvXlPoOy/Kubit-v.1.0.0?type=design&node-id=3922-29850&mode=dev',
2729
},
30+
render: ({ ...args }) => <StoryWithHooks {...args} />,
2831
} satisfies Meta<typeof Story>;
2932

3033
export default meta;
3134

3235
type Story = StoryObj<typeof meta> & { args: { themeArgs?: object } };
3336

37+
const StoryWithHooks = args => {
38+
const [value, setValue] = React.useState<string | number | undefined>(3);
39+
const onClick = () => {
40+
setValue(undefined);
41+
};
42+
43+
return (
44+
<div>
45+
<Story {...args} value={value} />
46+
<Button size="MEDIUM" variant="PRIMARY" onClick={onClick}>
47+
Clear
48+
</Button>
49+
</div>
50+
);
51+
};
52+
3453
const commonArgs: IInputCurrency = {
3554
variant: Object.values(variantsObject[themeSelected].InputCurrencyVariant || {})[0] as string,
3655
id: 'input',

src/components/pillV2/pillStandAlone.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import React from 'react';
23

34
import { useId } from '@/hooks/useId/useId';
@@ -26,7 +27,7 @@ const PillStandAloneComponent = (
2627

2728
return (
2829
<PillRootContainerStyled
29-
ref={ref}
30+
ref={ref as any}
3031
aria-controls={props['aria-controls']}
3132
aria-selected={type === PillType.TAB ? props.selected : undefined}
3233
as={[PillType.BUTTON, PillType.TAB].includes(type) ? PillAsButton : undefined}

src/hooks/useInput/useInput.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ export const useInput = (props: ParamsTypeInputHook): ReturnTypeInputHook => {
8989
}
9090
// limit or truncate the value
9191
controlValue(newValue);
92+
} else {
93+
handleSetValue('');
9294
}
9395
firstRender.current = false;
9496
}, [props.currentValue]);

0 commit comments

Comments
 (0)