react-native-toast-message icon indicating copy to clipboard operation
react-native-toast-message copied to clipboard

dynamic sized toast based on content

Open bj97301 opened this issue 2 years ago • 6 comments

bj97301 avatar May 24 '23 18:05 bj97301

Hey fellows, any reason this has not been merged yet?

Steven-MKN avatar May 14 '24 03:05 Steven-MKN

Hey fellows, any reason this has not been merged yet?

Not sure... @tgmarinho any insights?

bj97301 avatar Jun 28 '24 18:06 bj97301

when merge it?

zkteco-home avatar Jul 03 '24 14:07 zkteco-home

This would resolve https://github.com/calintamas/react-native-toast-message/issues/539

lucksp avatar Sep 18 '24 18:09 lucksp

This can be done by using BaseToast "style" and "contentContainerStyle" props

const Toast = (props) => {
  return <BaseToast
    {...props}
    text1NumberOfLines={0}
    text2NumberOfLines={0}
    contentContainerStyle={styles.contentContainer}
    style={styles.base}
  />
}

const styles = StyleSheet.create({
  base: {
    minHeight: 60,
    minWidth: 340,
    width: undefined,
    height: undefined,
    paddingVertical: 16,
  },
  contentContainer: {
    paddingHorizontal: 20,
  },
});

davru avatar Jan 24 '25 08:01 davru

@davru Certainly there are workarounds, thanks for this one. But it does not discount that this is a bug tbh, UI elements need to be responsive

Steven-MKN avatar Mar 11 '25 08:03 Steven-MKN