react-native-simple-dialogs icon indicating copy to clipboard operation
react-native-simple-dialogs copied to clipboard

Issue with styling Button Text

Open Eonsinde opened this issue 1 year ago • 3 comments

  • What version of React Native? 0.72.10
  • What version of the library? ^2.1.0
  • iOS/Android version? 11
  • Did the problem happen after updating React Native? No
  • Are you using the library for the first time? Yes
  • What code snippet did you use? I didn't use a code snippet, I just tried styling the Text component for each button in the confirmation dialog. The issue I noticed is only the color and colorDisabled styles actually modify the text's appearance for each button, the other styles don't work.

code snippet

github-issues

In the attached image, you can see I'm trying to use the textStyle to modify the transform, size and font family. Those styles do not work

The snippet below shows the usecase in a mobile application

Screenshot_20240613-170053

Eonsinde avatar Jun 13 '24 16:06 Eonsinde

Thank you for reporting.

I can confirm the bug, the style is being used instead of titleStyle here:

https://github.com/douglasjunior/react-native-simple-dialogs/blob/91700490b74437c6412bb08ead6a4faae155d92e/src/ConfirmDialog.tsx#L139

douglasjunior avatar Jun 13 '24 16:06 douglasjunior

As a workaround, you can temporarily pass the desired styles in the buttonProps.style prop.

douglasjunior avatar Jun 13 '24 16:06 douglasjunior

As a workaround, you can temporarily pass the desired styles in the buttonProps.style prop.

Alright, I haven't been able to find anything related to buttonProps.style, but I can wait for a fix to be released soon. Since my goal is to style the text, I don't think targeting button-related styles would be useful. Please correct me if I'm mistaken.

Eonsinde avatar Jun 13 '24 16:06 Eonsinde