Comments (4)
To be honest, they probably are somewhat confusing. The current extent of the documentation is in the TypeScript definition comments:
react-native-drax/src/types.ts
Lines 644 to 693 in 77ed753
These can be individually applied directly to a DraxView
via its props. When using DraxList
however, we need to pass them as an object through the itemStyles
prop so that it can pass them on to the individual DraxView
s that it renders for the list items.
You can think of them as a series of layers that are added onto the style for an item. The style
field is the basic one that is applied no matter what. The drag*Style
fields are additional stylings applied for various states of dragging (or not dragging) the item. As you have surmised, these apply to the original item still sitting where it was. The analogous hover*Style
fields are applied to the hovering view copy of the item which exists only during a drag. The remaining fields related to receiving/other are also applied to the non-hovering original item in the ways their comments suggest.
This is one of the features of the library that will benefit greatly from deeper documentation, and it is something I am very open to feedback and improvements upon. The goal here was to make the library as powerful and flexible as possible, while providing sensible defaults for the 80-90% use case. These fields do not all need to be specified, and indeed I imagine most folks only using a small number of them to make targeted style changes for their own purposes.
from react-native-drax.
I'll look into this tonight and reply more thoroughly.
from react-native-drax.
Ran long working on other issues tonight, hope to take a look at this this weekend. Sorry for the delay. (And sorry for repeating myself so much 😹)
from react-native-drax.
I think I will leave this issue open until we address it better in documentation and/or change the feature in a future release. Let me know if you have more comments or questions please, @chrisdrackett .
from react-native-drax.
Related Issues (20)
- Could not be used in expo go with android 12? HOT 2
- Cannot read properties of undefined (reading 'remove') HOT 2
- TypeError: undefined is not an object (evaluating 'listener.remove') HOT 1
- Drag starts on press instead of long press HOT 7
- RTL support? HOT 2
- Clipping leads to wrong sizes HOT 4
- SVG code HOT 2
- Conditional rendering of dragged item hover view when over specific receiver? (was: remove box logic) HOT 3
- Drag smooth on emulator but laggy on physical apk HOT 4
- Support for sorting horizontal wrapped lists?
- animate drop end similarly to snapback HOT 5
- Cannot drag out in web for expo sdk 49 HOT 5
- [iOS | Android] DragView does not return to the initial position after React Native 0.72.4 update HOT 2
- Expo Snack iOS Broken HOT 2
- Need Horizontal FlatList to hold items and still scroll for DraxViews/Recievers HOT 3
- Major improvements HOT 8
- react-native-drax doesnt work in react-native Modal component( HOT 1
- How to remove dragged view HOT 4
- DraxView all rendering issues HOT 2
- Ignoring gesture because view data was not found HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-drax.