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

Unable to override styles #58

Open
colinbes opened this issue Mar 15, 2022 · 0 comments
Open

Unable to override styles #58

colinbes opened this issue Mar 15, 2022 · 0 comments

Comments

@colinbes
Copy link

Using: Expo@44.0.6 on a Mac and running in IOS Simulator.

I am trying to override the font style for codeBlock and inlineCode, see below, but continue to get message that courier font is not found even though I am setting font to Courier New.

If I edit style.js file and substitute "Courier New" for "Courier" for codeBlock and inlineCode then it works.

It doesn't appear that my styles overrides styles.js

Additionally I am using Expo if this makes a difference

const RecipeDetailsView = (props: RecipeTableProps) => {
  return (
    <Modal      
    transparent={false}    
    visible={props.isVisible}                         
  >
    <View style={{paddingTop: 36,
                  justifyContent: 'center',
                  alignItems: 'center', 
                  height: 90}}>
      <Button title="Close" onPress={props.onClose} />
    </View>
    <View style={{marginHorizontal: 10}}>
      <ScrollView >
        <MarkdownView styles={markdownStyle} >
          {text}
        </MarkdownView>
      </ScrollView>
    </View>
  </Modal>
  )
}

const text = `
hello \`there\`


const markdownStyle = ({
  codeBlock: {
    fontFamily: "Arial",
    fontWeight: '500',
  },
  inlineCode: {
    backgroundColor: 'rgba(128, 128, 128, 0.25)',
    fontFamily: 'Arial',
    fontWeight: '500',
  },
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant