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

Should "styles" property be "style" to match react-pdf components? #9

Closed
jeffbski opened this issue Jan 15, 2020 · 3 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@jeffbski
Copy link

I got hung up on trying to use "style" property like we do with react-pdf components, but in react-pdf-table components you need to use "styles".

Is this intentional to use styles rather than style?

If possible it seems like it would be better to match react-pdf.

So currently this works

<TableCell styles={styles.headerCell}>Week Start</TableCell>

but I'm thinking it would be better to match react-pdf so it's not as confusing when switching between them and not realizing why it isn't working.

<TableCell style={styles.headerCell}>Week Start</TableCell>

https://react-pdf.org/styling

@dmk99
Copy link
Owner

dmk99 commented Jan 21, 2020

Yes, this makes a lot of sense. Sorry about the confusion around this, I will update the library to use
style.

@dmk99 dmk99 self-assigned this Jan 21, 2020
@dmk99 dmk99 added the enhancement New feature or request label Jan 21, 2020
@dmk99 dmk99 mentioned this issue Jan 21, 2020
@jeffbski
Copy link
Author

Awesome! Thanks.

dmk99 pushed a commit that referenced this issue Feb 5, 2020
@dmk99
Copy link
Owner

dmk99 commented Feb 5, 2020

This should now be available in version 0.2.0 0.3.0. I've also made the types align to what react-pdf expects e.g. a single Style or an array of Styles.

Relevant documentation: https://github.com/dmk99/react-pdf-table/blob/master/docs/typedoc/interfaces/_tablecell_.tablecellprops.md#optional-style

If there are any issues please let me know.

@dmk99 dmk99 closed this as completed Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants