Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
type ImageSourcePropType,
type LayoutChangeEvent,
type LayoutRectangle,
type StyleProp,
Text,
useWindowDimensions,
View,
Expand All @@ -38,7 +39,7 @@ interface AvatarBase extends AccessibilityProps {
*/
shape?: 'square' | 'circle'
/** Дополнительная стилизация для контейнера компонента */
style?: ViewStyle
style?: StyleProp<ViewStyle>
testID?: string
/** Callback функция при ошибке загрузки картинки */
onError?: ComponentProps<typeof Image>['onError']
Expand Down
3 changes: 2 additions & 1 deletion src/components/Badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Dimensions,
type LayoutChangeEvent,
type LayoutRectangle,
type StyleProp,
Text,
View,
type ViewStyle,
Expand All @@ -22,7 +23,7 @@ export interface BadgeBase
*/
severity?: BadgeSeverity
/** Дополнительная стилизация для контейнера компонента */
style?: ViewStyle
style?: StyleProp<ViewStyle>
}

interface BadgeText extends BadgeBase {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Input/FloatLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { memo } from 'react'
import { View, type ViewStyle } from 'react-native'
import { View, type StyleProp, type ViewStyle } from 'react-native'

import { InputTextBase } from './InputTextBase/InputTextBase'
import type { InputTextBaseProps } from './InputTextBase/types'
Expand All @@ -10,7 +10,7 @@ export interface FloatLabelProps extends InputTextBaseProps {
/** Показать индикатор загрузки в поле */
loading?: boolean
/** Дополнительная стилизация для контейнера компонента */
style?: ViewStyle
style?: StyleProp<ViewStyle>
}

/**
Expand Down
10 changes: 8 additions & 2 deletions src/components/Input/InputGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { memo, useCallback, useImperativeHandle, useMemo, useRef } from 'react'
import { type TextInput, View, StyleSheet, type ViewStyle } from 'react-native'
import {
type TextInput,
View,
StyleSheet,
type ViewStyle,
type StyleProp,
} from 'react-native'

import { makeStyles } from '../../utils/makeStyles'

Expand All @@ -14,7 +20,7 @@ interface InputGroupBaseProps {
/** Содержимое правого аддона группы */
right?: InputGroupAddonProps['content']
/** Дополнительная стилизация для контейнера компонента */
style?: ViewStyle
style?: StyleProp<ViewStyle>
}

export type InputGroupProps = InputGroupBaseProps & InputTextBaseProps
Expand Down
4 changes: 2 additions & 2 deletions src/components/Input/InputText.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { memo } from 'react'
import { View, type ViewStyle } from 'react-native'
import { View, type StyleProp, type ViewStyle } from 'react-native'

import { InputTextBase } from './InputTextBase/InputTextBase'
import type { InputTextBaseProps } from './InputTextBase/types'

export interface InputTextProps extends InputTextBaseProps {
/** Дополнительная стилизация для контейнера компонента */
style?: ViewStyle
style?: StyleProp<ViewStyle>
}

/**
Expand Down
9 changes: 7 additions & 2 deletions src/components/Input/InputTextBase/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { Ref, ReactNode } from 'react'
import type { TextInputProps, ViewStyle, TextInput } from 'react-native'
import type {
TextInputProps,
ViewStyle,
TextInput,
StyleProp,
} from 'react-native'

/** @see TextInputProps */
export interface InputTextBaseProps extends Omit<
Expand All @@ -21,7 +26,7 @@ export interface InputTextBaseProps extends Omit<
/** Озвучка для кнопки очистки поля */
clearButtonAccessibilityLabel?: string
/** Управление стилем контейнера поля ввода */
containerStyle?: ViewStyle
containerStyle?: StyleProp<ViewStyle>
/** Управление доступностью поля */
disabled?: boolean
/** Ref для управления полем ввода */
Expand Down
3 changes: 2 additions & 1 deletion src/components/Message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import { type ComponentProps, memo, type ReactNode, useMemo } from 'react'
import {
type AccessibilityProps,
type StyleProp,
View,
type ViewProps,
type ViewStyle,
Expand Down Expand Up @@ -56,7 +57,7 @@ export interface MessageProps
severity?: 'info' | 'success' | 'warning' | 'danger'

/** Дополнительная стилизация для контейнера компонента */
style?: ViewStyle
style?: StyleProp<ViewStyle>

/** Значение таймера, если нужно отображать таймер вместо иконки */
timerValue?: number
Expand Down
3 changes: 2 additions & 1 deletion src/components/ToggleButton/ToggleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { memo, useCallback, useMemo, useState } from 'react'
import {
type AccessibilityProps,
Pressable,
type StyleProp,
Text,
View,
type ViewProps,
Expand Down Expand Up @@ -44,7 +45,7 @@ export interface ToggleButtonProps
*/
size?: 'xlarge' | 'large' | 'base' | 'small'
/** Дополнительная стилизация для контейнера компонента */
style?: ViewStyle
style?: StyleProp<ViewStyle>
/** SVG-иконка */
Icon?: SvgSource
}
Expand Down
Loading