mmazzarolo / react-native-dialog

Pure JavaScript React-Native dialog
MIT License
682 stars 111 forks source link

Dialog buttons does not have equal width #149

Open forimbajosh21 opened 2 years ago

forimbajosh21 commented 2 years ago

Environment

System:
    OS: macOS 12.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 95.09 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v14.17.0/bin/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.15 - /Library/Java/JavaVirtualMachines/jdk-11.0.15.jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0 
    react-native: 0.70.3 => 0.70.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Platforms

Versions

Description

Reproducible Demo

mmazzarolo commented 2 years ago

Ha, good catch! Open for contribution for this issue :)

kingajohanna commented 1 year ago

just add the width: "50%" to the buildStyles in the button.js file

const buildStyles = (isDark) => StyleSheet.create({ button: Platform.select({ ios: { flexGrow: 1, flexShrink: 1, height: 46, width: '50%', justifyContent: "center", alignItems: "center", },