npm promulgates marsupials

# npm

## babel-plugin-react-native-stylename-to-style

0.13.0 • Public • Published

# babel-plugin-react-native-stylename-to-style

Transform JSX `styleName` property to `style` property in react-native. The `styleName` attribute and syntax are based on babel-plugin-react-css-modules.

## Usage

or

### Step 2: Configure `.babelrc`

You must give one or more file extensions inside an array in the plugin options.

``````{
"presets": [
"react-native"
],
"plugins": [
["react-native-stylename-to-style", {
"extensions": ["css"]
}]
]
}
``````

## Anonymous reference

Anonymous reference can be used when there is only one stylesheet import.

↓ ↓ ↓ ↓ ↓ ↓

↓ ↓ ↓ ↓ ↓ ↓

↓ ↓ ↓ ↓ ↓ ↓

↓ ↓ ↓ ↓ ↓ ↓

↓ ↓ ↓ ↓ ↓ ↓

## Named reference

Named reference is used to refer to a specific stylesheet import.

↓ ↓ ↓ ↓ ↓ ↓

↓ ↓ ↓ ↓ ↓ ↓

## Keywords

### Install

`npm i babel-plugin-react-native-stylename-to-style`

1,862

0.13.0

MIT

14.4 kB

4