Skip to content

Commit

Permalink
fix(types): Addition of search to TextInputType (#1518)
Browse files Browse the repository at this point in the history
Addition of missing TextInputType option "search"
  • Loading branch information
bobinska-dev authored Dec 10, 2024
1 parent 5ffb4ef commit 872c36b
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions src/core/primitives/textInput/textInput.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import {CloseIcon} from '@sanity/icons'
import {ThemeFontWeightKey} from '@sanity/ui/theme'
import {forwardRef, isValidElement, useCallback, useImperativeHandle, useMemo, useRef} from 'react'
import {isValidElementType} from 'react-is'
import {styled} from 'styled-components'
import {EMPTY_RECORD} from '../../constants'
import {useArrayProp, useCustomValidity} from '../../hooks'
import { CloseIcon } from '@sanity/icons'

Check failure on line 1 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·CloseIcon·` with `CloseIcon`
import { ThemeFontWeightKey } from '@sanity/ui/theme'

Check failure on line 2 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·ThemeFontWeightKey·` with `ThemeFontWeightKey`
import { forwardRef, isValidElement, useCallback, useImperativeHandle, useMemo, useRef } from 'react'

Check failure on line 3 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·forwardRef,·isValidElement,·useCallback,·useImperativeHandle,·useMemo,·useRef·` with `forwardRef,·isValidElement,·useCallback,·useImperativeHandle,·useMemo,·useRef`
import { isValidElementType } from 'react-is'

Check failure on line 4 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·isValidElementType·` with `isValidElementType`
import { styled } from 'styled-components'

Check failure on line 5 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·styled·` with `styled`
import { EMPTY_RECORD } from '../../constants'

Check failure on line 6 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·EMPTY_RECORD·` with `EMPTY_RECORD`
import { useArrayProp, useCustomValidity } from '../../hooks'

Check failure on line 7 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·useArrayProp,·useCustomValidity·` with `useArrayProp,·useCustomValidity`
import {
responsiveInputPaddingStyle,
responsiveRadiusStyle,
ResponsiveRadiusStyleProps,
responsiveInputPaddingStyle,
TextInputInputStyleProps,
TextInputRepresentationStyleProps,
TextInputResponsivePaddingStyleProps,
textInputBaseStyle,
textInputFontSizeStyle,
TextInputInputStyleProps,
textInputRepresentationStyle,
TextInputRepresentationStyleProps,
TextInputResponsivePaddingStyleProps,
textInputRootStyle,
} from '../../styles/internal'
import {useRootTheme} from '../../theme'
import {Radius} from '../../types'
import {Box} from '../box'
import {Button, ButtonProps} from '../button'
import {Card} from '../card'
import {Text} from '../text'
import { useRootTheme } from '../../theme'

Check failure on line 20 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·useRootTheme·` with `useRootTheme`
import { Radius } from '../../types'

Check failure on line 21 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·Radius·` with `Radius`
import { Box } from '../box'

Check failure on line 22 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·Box·` with `Box`
import { Button, ButtonProps } from '../button'
import { Card } from '../card'
import { Text } from '../text'

/**
* @public
Expand All @@ -34,6 +34,7 @@ export type TextInputClearButtonProps = Omit<ButtonProps, 'as'> &
* @public
*/
export type TextInputType =
| 'search'
| 'date'
| 'datetime-local'
| 'email'
Expand Down

0 comments on commit 872c36b

Please sign in to comment.