Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nativebase : change thumbnail default size

I can't change the default size of the thumbnail from NativeBase. I can display the default circle, which is the small and the large one, but I want to display a bigger circle than the default size. Here's my code for the thumbnail :

<Thumbnail size={200} style={{margin: 30}} source={require('../../../public/images/profile/yellow.jpg')} />

The props size doesn't work, the thumbnail remains small.

My NativeBase version : 2.3.5

like image 475
Citrix Avatar asked Nov 27 '25 05:11

Citrix


1 Answers

Native Base Component doesn't have a size props, you should add width and height, and one more thing you shouldn't forget please add borderRadius divided by 2 to ensure the shape is retain Circle

<Thumbnail style={{width: 30, height: 30, borderRadius: 30/2}} source={require('../../../public/images/profile/yellow.jpg')} />
like image 180
Hanny Setiawan Avatar answered Nov 28 '25 18:11

Hanny Setiawan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!