react-native-ui-lib icon indicating copy to clipboard operation
react-native-ui-lib copied to clipboard

`abs` not recognized as valid for TypeScript

Open MrSquaare opened this issue 2 years ago • 1 comments

Description

When using the prop abs with TypeScript, it throw an error:

Property 'abs' does not exist on type 'IntrinsicAttributes & ViewProps & RefAttributes<View>'

Related to

  • [ ] Components
  • [ ] Demo
  • [ ] Docs
  • [x] Typings

Steps to reproduce

  1. Use the <View /> component in a TypeScript project
  2. Set the abs prop to this component

Expected behavior

Be valid

Actual behavior

Invalid type

More Info

Code snippet

const Component = () => {
  return <View abs />;
}

Screenshots/Video

Environment

  • React Native version: 0.72
  • React Native UI Lib version: 7.5.0

Affected platforms

  • [x] Android
  • [x] iOS
  • [x] Web

MrSquaare avatar Jun 27 '23 08:06 MrSquaare

PositionLiterals = 'absF' | 'absL' | 'absR' | 'absT' | 'absB' | 'absV' | 'absH'

Above are the valid abs props for a View.

I can take it up and update the type definition.

gyanbhartip avatar Oct 01 '23 16:10 gyanbhartip