callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.54k stars 2.05k forks source link

AdjustsFontSizeToFit for Buttons #2158

Closed cr1979 closed 3 years ago

cr1979 commented 3 years ago

Hello, I need a way to automaticly scale a text in a button. So a larger text fit into a button. Currently there is no adjustsFontSizeToFit property in the text element of the react native paper button.

Is your feature request related to a problem? Please describe. React Native Paper supports adjustsFontSizeToFit property in the text element but not in buttons.

Describe the solution you'd like I like that the attribute adjustsFontSizeToFit will be added to the button. So a text can automaticly scaled to fit. This is important if you have a multilanguage project.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context an example of a working text element:

 <Text adjustsFontSizeToFit={true} allowFontScaling={true} numberOfLines={1} style={[globalStyles.headline]}>{t('HEADER_TEXT')}</Text>

currently using: react-native: ^0.62.2, react-native-paper: ^3.6.0 react-native-vector-icons: ^6.6.0

github-actions[bot] commented 3 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

github-actions[bot] commented 3 years ago

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

github-actions[bot] commented 3 years ago

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

codekojo commented 1 year ago

Still no solution?

yannick-softwerft commented 1 month ago

+1