kristerkari/css-to-react-native-transform

add option `ignoreRule` to support ignore some specific selector

lovetingyuan opened this issue · 3 comments

.foo {
  color: red;
}
.bar {
  font-size: 12px;
}
css2rn(csscode, {
  ignoreRule(selector) {
    if (selector === '.foo') { return true }
  }
})

result:

{
  "bar": { fontSize: 12 }
}

BTW, styled-component is not activly matained, I worry about the quality of related projects.

Thanks! This could be a useful option to add to the library.