Skip to main content
adicionou 140 caracteres ao conteúdo
Fonte Link

https://stackoverflow.com/questions/42707327/passing-props-into-external-stylesheet-in-react-native

Veja esse tópico que contém algumas explicações mais detalhadas

interface ButtonsProps extends TouchableOpacityProps{
    title: string;
    enabled: boolean;
} 

const meuComponent = ({title, enabled}: ButtonsProps)=>{
    return(...);
}

export const styles = (iconColor,iconSize) => StyleSheet.create({
    icon : {
    color: iconColor,
    fontSize: iconSize
  }
}

interface ButtonsProps extends TouchableOpacityProps{
    title: string;
    enabled: boolean;
} 

const meuComponent = ({title, enabled}: ButtonsProps)=>{
    return(...);
}

https://stackoverflow.com/questions/42707327/passing-props-into-external-stylesheet-in-react-native

Veja esse tópico que contém algumas explicações mais detalhadas

interface ButtonsProps extends TouchableOpacityProps{
    title: string;
    enabled: boolean;
} 

const meuComponent = ({title, enabled}: ButtonsProps)=>{
    return(...);
}

export const styles = (iconColor,iconSize) => StyleSheet.create({
    icon : {
    color: iconColor,
    fontSize: iconSize
  }
}

Fonte Link

interface ButtonsProps extends TouchableOpacityProps{
    title: string;
    enabled: boolean;
} 

const meuComponent = ({title, enabled}: ButtonsProps)=>{
    return(...);
}