mirror of
https://github.com/status-im/status-web.git
synced 2025-01-12 21:54:36 +00:00
temporarily update Image props
This commit is contained in:
parent
ad4a2ad296
commit
4491ecaaf7
@ -1,15 +1,12 @@
|
|||||||
import { forwardRef } from 'react'
|
import { forwardRef } from 'react'
|
||||||
|
|
||||||
import { isWeb, setupReactNative, styled } from '@tamagui/core'
|
import { setupReactNative, styled } from '@tamagui/core'
|
||||||
import { Image as RNImage } from 'react-native'
|
import { Image as RNImage } from 'react-native'
|
||||||
|
|
||||||
import type { GetProps } from '@tamagui/core'
|
import type { GetProps } from '@tamagui/core'
|
||||||
import type { Ref } from 'react'
|
import type { Ref } from 'react'
|
||||||
import type { ImagePropsBase as RNImageProps } from 'react-native'
|
import type { ImagePropsBase as RNImageProps } from 'react-native'
|
||||||
|
|
||||||
// TODO: this was used in @tamagui/image package. Why?
|
|
||||||
// import { focusableInputHOC } from '@tamagui/focusable'
|
|
||||||
|
|
||||||
setupReactNative({
|
setupReactNative({
|
||||||
Image: RNImage,
|
Image: RNImage,
|
||||||
})
|
})
|
||||||
@ -54,7 +51,7 @@ const Image = (props: Props, ref: Ref<HTMLImageElement>) => {
|
|||||||
|
|
||||||
const source = {
|
const source = {
|
||||||
uri: src,
|
uri: src,
|
||||||
...(isWeb && { width, height }),
|
// ...(isWeb && { width, height }),
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -70,6 +67,7 @@ const Image = (props: Props, ref: Ref<HTMLImageElement>) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO?: this was used in @tamagui/image package. Why?
|
||||||
// focusableInputHOC(Image)
|
// focusableInputHOC(Image)
|
||||||
const _Image = Base.extractable(forwardRef(Image))
|
const _Image = Base.extractable(forwardRef(Image))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user