React-native-elements: Buttons seem to have a 15-20px margin on each side of it

Created on 11 Apr 2018  路  3Comments  路  Source: react-native-elements/react-native-elements

Description

Just trying out some Components, I noticed that buttons have a pesky margin on the sides I can't get rid of. I've tried buttonStyle and containerStyle margin attributes, just can't figure out how to get these buttons flush against elements next to it.

Reproduction Steps and Sample Code

import React from 'react';
import { Button } from 'react-native-elements';

export default class DetailsScreen extends React.Component {
  render() {
    return (
        <Button
         title="Why the margin?"
        />
    );
  }
}

Most helpful comment

@kylewetton Which version are you using ?

EDIT: Seems like you're using v0.19.x, and looking at the docs of v1.0.0-beta4. Remember you can check versioned doc by clicking on the version in the website header !

You can override the margins by using containerViewStyle={{ marginLeft: 0, marginRight: 0 }}, but if you upgrade to the v1.0.0-beta4 you won't need this anymore 馃敟

npm install -S react-native-elements@beta

All 3 comments

@kylewetton Which version are you using ?

EDIT: Seems like you're using v0.19.x, and looking at the docs of v1.0.0-beta4. Remember you can check versioned doc by clicking on the version in the website header !

You can override the margins by using containerViewStyle={{ marginLeft: 0, marginRight: 0 }}, but if you upgrade to the v1.0.0-beta4 you won't need this anymore 馃敟

npm install -S react-native-elements@beta

Legendary, thanks

hello

Glad you got this working 馃憦

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xavier-villelegier picture xavier-villelegier  路  3Comments

mateen-hussain picture mateen-hussain  路  3Comments

hazmah0 picture hazmah0  路  3Comments

binzailani3136 picture binzailani3136  路  3Comments

Slapbox picture Slapbox  路  3Comments