add rax support for centered

This commit is contained in:
Hoa Nguyen Thai 2019-03-05 12:04:36 +07:00
parent e4cd0c5554
commit 182e74b4b3
2 changed files with 19 additions and 0 deletions

1
addons/centered/rax.js Normal file
View File

@ -0,0 +1 @@
module.exports = require('./dist/rax');

View File

@ -0,0 +1,18 @@
/** @jsx createElement */
// eslint-disable-next-line import/no-extraneous-dependencies
import { createElement } from 'rax';
// eslint-disable-next-line import/no-extraneous-dependencies
import View from 'rax-view';
import styles from './styles';
export default function(storyFn) {
return (
<View style={styles.style}>
<View style={styles.innerStyle}>{storyFn()}</View>
</View>
);
}
if (module && module.hot && module.hot.decline) {
module.hot.decline();
}