Comments (1)
从使用上来说这确实是个问题,不过Teaset的设计初衷就是这样的,就是传入element的属性能控制所有样式,所有的Teaset组件都是按这个方式实现的。
就这个问题来说,如果ListRow预设paddingRight=12,有两个方法可以实现:
-
把传入的element放到设置了paddingRight=12的View容器里
-
使用cloneElement为传入的element的style属性增加paddingRight=12
前者的问题是使用者不能指定别的paddingRight值,后者的问题是假定传入的element支持style,但不一定总是这样,这就是这个问题的原因。
你可以派生出一个新的类,在类内作易用性封装,可参照Example中的SelectRow实现:https://github.com/rilyu/teaset/blob/master/example/views/SelectRow.js
from teaset.
Related Issues (20)
- oncloseRequest 和 modal
- The development server returned response error code: 500 HOT 4
- 麻烦兼容下rn 0.64.0 HOT 12
- react-native 0.64.0 不能正常使用 HOT 14
- 作者看到的话改一下吧 HOT 1
- _opacityActive 有关问题 HOT 1
- Unable to resolve module react-native/Libraries/Animated/src/Easing from ../node_modules/teaset/components/ListRow/TouchableOpacity.js
- Unable to resolve module react-native/Libraries/Animated/src/Easing from /Users/Edmond/WorkSpace/Global1V1/zeus_android/node_modules/teaset/components/ListRow/TouchableOpacity.js
- PullVIew HOT 2
- input标签禁用
- 这行代码为什么不显示呢 HOT 1
- Error: Unable to resolve module react-native/Libraries/Animated/src/Easing from D:\working_workspace\waterproof_project\6.code\newWaterproofApp\node_modules\teaset\components\ListRow\TouchableOpacity.js: react-native/Libraries/Animated/src/Easing could not be found within the project or in these directories: HOT 4
- Drawer组件非常卡顿,检查后发现放进去的view会被挂载9次!!! HOT 1
- 有人有同样的问题么? 我最近在升级0.66 升级完之后发现 toast menu 都无效了也没有错误 HOT 1
- version diff -- Libraries/Pressability/Pressability.js 0.660. 0.62.0 version API differences, these APIs need to be updated if the latest version is used
- 库组件import目录问题 HOT 1
- 作者不维护了吗 HOT 6
- Wheel 滑动 bug HOT 1
- ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types' HOT 2
- 有没有考虑继续迭代
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 teaset.