Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase width of number grid #84

Closed
alberthitanaya opened this issue May 6, 2019 · 2 comments
Closed

Increase width of number grid #84

alberthitanaya opened this issue May 6, 2019 · 2 comments

Comments

@alberthitanaya
Copy link

Would it be possible to make something like this using the props currently provided?:

image

I can see that grid imposes a maxwidth on the number pads, would it be possible to expose that or some other control so we can control the width of the number pad?

Thanks

@jeremy-farnault
Copy link
Contributor

Hi,

I've managed to do this with minor changes, I'll try to publish it soon :).

Cheers,
Jeremy

@jeremy-farnault
Copy link
Contributor

Hi,

With the latest version, you can now use the full width.
I've done something real quick that looks like that:

Screen Shot 2019-05-23 at 2 39 49 PM

So you should be able to reach your goal!

class PinCode extends React.PureComponent<IProps, IState> {

  render() {
    return (
      <PINCode
        status={'choose'}
        stylePinCodeButtonCircle={styles.buttonCircle}
        stylePinCodeEmptyColumn={styles.colEmpty}
        stylePinCodeColumnButtons={styles.colButtonCircle}
      />
    )
  }
}

export default PinCode

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center'
  },
  colButtonCircle: {
    marginLeft: grid.unit / 2,
    marginRight: grid.unit / 2,
    alignItems: 'center',
    width: grid.unit * 8,
    height: grid.unit * 4
  },
  colEmpty: {
    marginLeft: grid.unit / 2,
    marginRight: grid.unit / 2,
    width: grid.unit * 8,
    height: grid.unit * 4
  },
  buttonCircle: {
    alignItems: 'center',
    justifyContent: 'center',
    width: grid.unit * 8,
    height: grid.unit * 4,
    backgroundColor: 'rgb(242, 245, 251)',
    borderRadius: grid.unit * 4
  }
})

Cheers,
Jeremy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants