Skip to content

Commit e1c2e79

Browse files
mdeliatftraefiker
authored andcommitted
chore: fix type and lint errors
1 parent ebb8afa commit e1c2e79

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Re-export from plain TypeScript file to avoid circular dependencies
22
// The source of truth is Button.theme.ts
3-
export { buttonLightTheme, buttonDarkTheme } from './Button.theme';
3+
export { buttonDarkTheme, buttonLightTheme } from './Button.theme';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Re-export from plain TypeScript file to avoid circular dependencies
22
// The source of truth is ButtonSwitch.theme.ts
3-
export { buttonSwitchLightTheme, buttonSwitchDarkTheme } from './ButtonSwitch.theme';
3+
export { buttonSwitchDarkTheme, buttonSwitchLightTheme } from './ButtonSwitch.theme';

components/ButtonSwitch/ButtonSwitch.vanilla.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
22
import { assignInlineVars } from '@vanilla-extract/dynamic';
3-
import { ComponentProps, forwardRef } from 'react';
3+
import { forwardRef } from 'react';
44

55
import { CSSProps, processCSSProp } from '../../styles/cssProps';
66
import { useVanillaExtractTheme } from '../../styles/themeContext';
77
import { buttonSwitchContainer, buttonSwitchItem } from './ButtonSwitch.vanilla.css';
88

99
// Container Component
10-
interface ButtonSwitchContainerVanillaProps
11-
extends ComponentProps<typeof ToggleGroupPrimitive.Root>,
12-
CSSProps {}
10+
type ButtonSwitchContainerVanillaProps = (
11+
| ToggleGroupPrimitive.ToggleGroupSingleProps
12+
| ToggleGroupPrimitive.ToggleGroupMultipleProps
13+
) &
14+
CSSProps;
1315

1416
export const ButtonSwitchContainerVanilla = forwardRef<
1517
React.ElementRef<typeof ToggleGroupPrimitive.Root>,
@@ -38,9 +40,8 @@ export const ButtonSwitchContainerVanilla = forwardRef<
3840
ButtonSwitchContainerVanilla.displayName = 'ButtonSwitchContainerVanilla';
3941

4042
// Item Component
41-
interface ButtonSwitchItemVanillaProps
42-
extends ComponentProps<typeof ToggleGroupPrimitive.Item>,
43-
CSSProps {}
43+
type ButtonSwitchItemVanillaProps = Omit<ToggleGroupPrimitive.ToggleGroupItemProps, 'css'> &
44+
CSSProps;
4445

4546
export const ButtonSwitchItemVanilla = forwardRef<
4647
React.ElementRef<typeof ToggleGroupPrimitive.Item>,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Re-export from plain TypeScript file to avoid circular dependencies
22
// The source of truth is IconButton.theme.ts
3-
export { iconButtonLightTheme, iconButtonDarkTheme } from './IconButton.theme';
3+
export { iconButtonDarkTheme, iconButtonLightTheme } from './IconButton.theme';

components/Label/Label.vanilla.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('LabelVanilla', () => {
5252
});
5353

5454
it('should apply variant prop', () => {
55-
const variants = ['gray', 'contrast'] as const;
55+
const variants = ['subtle', 'contrast'] as const;
5656

5757
variants.forEach((variant) => {
5858
const { container, unmount } = renderWithTheme(
@@ -69,7 +69,7 @@ describe('LabelVanilla', () => {
6969
});
7070

7171
it('should apply transform prop', () => {
72-
const transforms = ['uppercase', 'lowercase', 'capitalize'] as const;
72+
const transforms = ['uppercase', 'capitalize', 'capitalizeWords'] as const;
7373

7474
transforms.forEach((transform) => {
7575
const { container, unmount } = renderWithTheme(

0 commit comments

Comments
 (0)