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

Styled API #3

Open
danvim opened this issue Jan 21, 2024 · 0 comments
Open

Styled API #3

danvim opened this issue Jan 21, 2024 · 0 comments

Comments

@danvim
Copy link
Owner

danvim commented Jan 21, 2024

Features

Phase 1

  • Chainable styled function
  • Additional typed props

Phase 2

  • Themes

Phase 3

  • Collectible styles for optimization

Example API

import {styled} from 'react-pdfmake-reconciler'

const Text = styled('pdf-text')({
  color: '#ff0000'
})

const Text2 = styled('pdf-text')<{size: number}>(({
  color: props => props.theme.textColor,
  fontSize: props => props.size
})
@danvim danvim changed the title Styled API for styled components Styled API Jan 21, 2024
danvim added a commit that referenced this issue Jan 23, 2024
- Update PdfPreview
- Update docs
danvim added a commit that referenced this issue Jan 23, 2024
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