Skip to content

Commit

Permalink
fix button prefix props
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Sep 2, 2024
1 parent d7cd0a9 commit b0126b8
Show file tree
Hide file tree
Showing 8 changed files with 241 additions and 222 deletions.
2 changes: 1 addition & 1 deletion components/src/components/atoms/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type BaseProps = {
/** Show indicator that button has extra info via tooltip. */
shouldShowTooltipIndicator?: boolean
color?: Color
} & Omit<BoxProps, 'size'>
} & Omit<BoxProps, 'size' | 'prefix'>

type WithAnchor = {
/** The href attribute for the anchor element. */
Expand Down
2 changes: 1 addition & 1 deletion components/src/components/atoms/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const Spinner = React.forwardRef<HTMLElement, SpinnerProps>(
$color={color}
$size={size}
className={styles.animation}
ref={ref as any}
ref={ref}
>
{accessibilityLabel && (
<VisuallyHidden>{accessibilityLabel}</VisuallyHidden>
Expand Down
2 changes: 1 addition & 1 deletion components/src/components/atoms/Tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Tag: React.FC<TagProps> = ({
backgroundColor={{
base: getValueForColorStyle(colorStyle, 'background'),
hover: getValueForColorStyle(
colorStyle as any,
colorStyle,
hover ? 'hover' : 'background',
),
active: getValueForColorStyle(colorStyle, 'hover'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import * as React from 'react'
import type { RefObject } from 'react'
import { useState } from 'react'
Expand Down
3 changes: 2 additions & 1 deletion components/src/components/molecules/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type { FieldBaseProps } from '../../atoms/Field/Field'
import { getTestId } from '../../../utils/utils'
import type { BoxProps } from '../../atoms/Box/Box'
import { Box } from '../../atoms/Box/Box'
import type { ColorStyle } from '../CheckboxRow/utils/getValueForColorStyle'

type NativeInputProps = React.InputHTMLAttributes<HTMLInputElement>

Expand Down Expand Up @@ -61,7 +62,7 @@ Omit<
> &
WithColorStyle

const InputBox = React.forwardRef<HTMLElement, BoxProps & { $colorStyle: any }>(
const InputBox = React.forwardRef<HTMLElement, BoxProps & { $colorStyle: ColorStyle }>(
({ $colorStyle, disabled, checked, ...props }, ref) => (
<Box
position="relative"
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const baseConfig = tseslint.config(
rules: {
'@eslint-react/dom/no-missing-button-type': 'off',
'stylistic/no-multiple-empty-lines': ['error', { max: 1 }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/consistent-type-imports': 'error',
'@eslint-react/no-duplicate-key': 'warn',
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
]
},
"devDependencies": {
"@eslint-react/eslint-plugin": "^1.9.0",
"@eslint-react/eslint-plugin": "^1.12.4",
"@eslint/compat": "^1.1.1",
"@eslint/js": "^9.8.0",
"@next/eslint-plugin-next": "^14.2.5",
Expand Down
449 changes: 233 additions & 216 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit b0126b8

Please sign in to comment.