Setting containerStyle to an object or StyleSheet that doesn't have padding property results in an error
See original GitHub issueThis code results in an error:
<SwitchToggle
containerStyle={{ width: 48, height: 16, borderRadius: 8 }}
switchOn={true}
onPress={() => {}}
/>
Error message:
Exception thrown while executing UI block: -[NSNull floatValue]: unrecognized selector sent to instance 0x110525f28
While this code works fine:
<SwitchToggle
containerStyle={{
width: 48,
height: 16,
borderRadius: 8,
padding: 0, // < ------------ Added
}}
switchOn={true}
onPress={() => {}}
/>
(thanks for the lib!)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Setting containerStyle to an object or StyleSheet that doesn't ...
This code results in an error: {}} /> Error message: Exception thrown while ... or StyleSheet that doesn't have padding property results in...
Read more >How do I prevent the padding property from changing width or ...
Let's say I create another DIV named anotherdiv exactly the same as newdiv , and put it inside of newdiv but newdiv has...
Read more >padding | CSS-Tricks
Padding values are set using lengths or percentages, and cannot accept negative values. The initial, or default, value for all padding ...
Read more >object-fit - CSS: Cascading Style Sheets - MDN Web Docs
The object-fit CSS property sets how the content of a replaced element, such as an or , should be resized to fit its...
Read more >CSS - Cascading Style Sheets, designing for the Web - W3C
A style sheet is a set of one or more rules that apply to an HTML document. ... A semicolon separates the declarations...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi.
react-native-switch-toggle
has been deprecated for a while and is migrated toreact-hook
in @dooboo-ui/native-switch-toggle. Hope you guys to check this out.Closes due to inactivity. Version 2 is released just now.