1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Bump packages

And deprecate react-native-feather
This commit is contained in:
xmflsct
2023-01-25 00:15:46 +01:00
parent ebc6d03c6a
commit 9d9c16df06
77 changed files with 562 additions and 535 deletions

View File

@ -1,15 +1,16 @@
import React, { createElement } from 'react'
import FeatherNames from '@expo/vector-icons/build/vendor/react-native-vector-icons/glyphmaps/Feather.json'
import Feather from '@expo/vector-icons/Feather'
import React from 'react'
import { AccessibilityProps, StyleProp, View, ViewStyle } from 'react-native'
import * as FeatherIcon from 'react-native-feather'
export type IconName = keyof typeof FeatherNames
export interface Props {
accessibilityLabel?: AccessibilityProps['accessibilityLabel']
name: string
name: IconName
size: number
color: string
fill?: string
strokeWidth?: number
style?: StyleProp<ViewStyle>
crossOut?: boolean
}
@ -19,8 +20,6 @@ const Icon: React.FC<Props> = ({
name,
size,
color,
fill,
strokeWidth = 2,
style,
crossOut = false
}) => {
@ -37,13 +36,7 @@ const Icon: React.FC<Props> = ({
}
]}
>
{createElement(FeatherIcon[name], {
width: size,
height: size,
color,
fill,
strokeWidth
})}
<Feather name={name} size={size} color={color} />
{crossOut ? (
<View
style={{
@ -51,7 +44,7 @@ const Icon: React.FC<Props> = ({
transform: [{ rotate: '45deg' }],
width: size * 1.35,
borderBottomColor: color,
borderBottomWidth: strokeWidth
borderBottomWidth: 2
}}
/>
) : null}