Skip to content

feat(template): added template for cssObject#18

Open
gizeasy wants to merge 1 commit intokristerkari:masterfrom
gizeasy:template
Open

feat(template): added template for cssObject#18
gizeasy wants to merge 1 commit intokristerkari:masterfrom
gizeasy:template

Conversation

@gizeasy
Copy link

@gizeasy gizeasy commented Jul 15, 2021

Adds the ability to create your own file template.
Useful when you need to export wrapped in StyleSheet.create

return lessTransformer.transform({
        src,
        filename,
        options: {...options, lessOptions},
        template: cssObject =>
          `var RN = require('react-native'); module.exports = RN.StyleSheet.create(${JSON.stringify(
            cssObject,
          )});`,
      });

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.

1 participant