Zhan
(Mr Zhan)
1
how to write like export default withStyles(styles)(App) in haxe?
import {withStyles} from '@material-ui/core/styles'
// ...
const styles = theme => ({
paper: {
padding: theme.spacing(2),
// ...
},
// ...
})
class App extends React.Component {
render() {
const {classes} = this.props
// ...
}
}
export default withStyles(styles)(App)
kLabz
(Rudy Ges)
2
This particular example is included in material-ui lib: https://gist.github.com/kLabz/20f6e4dece9aa4c256af58514626b66f
As for defining externs for npm packages depending on export/import kind, this should still cover all (most?) cases: Using NPM modules from Haxe | Philippe.me
Zhan
(Mr Zhan)
3
@kLabz ,how to deal with this in haxe ? array as object key
[theme.breakpoints.up(‘sm’)]:
inputInput: {
width: '100%',
[theme.breakpoints.up('sm')]: {
width: '12ch',
'&:focus': {
width: '20ch',
},
},
},
from here