Skip to content

Added root view style #50

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

Closed
wants to merge 1 commit into from
Closed

Conversation

diegolmello
Copy link

Currently, root view has no style applied.
With this PR, it's possible to do it through view style.

Example:

import Markdown, { AstRenderer, renderRules, styles } from 'react-native-markdown-renderer';

const renderer = new AstRenderer({
    ...renderRules
}, {
    ...styles,
    view: {
        flex: 1,
        backgroundColor: 'blue'
    }
});

return <Markdown renderer={renderer.render}>Text</Markdown>

@mientjan
Copy link
Owner

mientjan commented Jun 4, 2018

@diegolmello yes, you are right we should add this but i think the style should not be view but root. see c6dd684 the change i made. thx for the pull.

@mientjan mientjan closed this Jun 4, 2018
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

Successfully merging this pull request may close these issues.

2 participants