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

Button style not apply in theme version 2 #3633

Closed
alexanderiscoding opened this issue Jan 30, 2023 · 5 comments · Fixed by #3651
Closed

Button style not apply in theme version 2 #3633

alexanderiscoding opened this issue Jan 30, 2023 · 5 comments · Fixed by #3651

Comments

@alexanderiscoding
Copy link

Current behaviour

<Button style={{ borderRadius: 50 }} buttonColor={colors.buttonAction} contentStyle={{ padding: 5, flexDirection: 'row-reverse' }} icon="open-in-new" mode="contained"
onPress={() => openLink("")} uppercase={false}>
text button

import { Provider as PaperProvider, MD2LightTheme, MD2DarkTheme } from 'react-native-paper';

const ThemeDark = {
...MD2DarkTheme,
roundness: 2,
version: 2,
colors: {
...MD2DarkTheme.colors,
primary: '#000000',

Expected behaviour

apply style in button

Your Environment

software version
android 12
react-native 0.71.1
react-native-paper 5.1.4
@lukewalczak
Copy link
Member

Could you please explain what exactly doesn't work? I've created a snack based on your code snippet and I'm not able to observe any issue.

@pablop94
Copy link

pablop94 commented Feb 1, 2023

I'm having the same issue with uppercase={false}, when using md2 in latest react native version. The button label is uppercase

@lukewalczak
Copy link
Member

I'm having the same issue with uppercase={false}, when using md2 in latest react native version. The button label is uppercase

Thanks for the report, we are going to fix that regression.

@alexanderiscoding
Copy link
Author

https://imgur.com/q2KDIuq

This bug only, this button inside card action

This is work

<Card.Content style={{ marginBottom: 10 }}> <Button style={{ flex: 1, borderRadius: 50 }} buttonColor={colors.buttonAction} contentStyle={{ padding: 5, flexDirection: 'row-reverse' }} icon="open-in-new" mode="contained" onPress={() => irExterno(mensagem.rediurl)} uppercase={false}> Acessar Conteúdo </Button> </Card.Content>

this not work

<Card.Actions style={{ alignSelf: 'center' }}> <Button style={{ flex: 1, borderRadius: 50 }} buttonColor={colors.buttonAction} contentStyle={{ padding: 5, flexDirection: 'row-reverse' }} icon="open-in-new" mode="contained" onPress={() => irExterno(mensagem.rediurl)} uppercase={false}> Acessar Conteúdo </Button> </Card.Actions>

@lukewalczak
Copy link
Member

@alexanderfsm I see the problem right now, will investigate that 🧐

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

Successfully merging a pull request may close this issue.

3 participants