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

Pass state with renderMark's callback #276

Open
johnlahut opened this issue Oct 10, 2022 · 1 comment
Open

Pass state with renderMark's callback #276

johnlahut opened this issue Oct 10, 2022 · 1 comment

Comments

@johnlahut
Copy link

johnlahut commented Oct 10, 2022

Is it possible to access the value as part of the mark's render function?

I would like to style marks depending on the value that the mark represents.

@chrisfeghali
Copy link

Hi @johnlahut, came across this same issue. You can access the value with props.key.

renderMark={(props) => <div {...props}>{props.key}</div>}

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

2 participants