import PropTypes from 'prop-types'
export const baseTypes = {
alignSelf: PropTypes.oneOf(['start', 'center', 'end', 'stretch'])
}
import * as React from 'react'
import PropTypes from 'prop-types'
import { baseTypes } from './propTypeDefinitions'
class Box extends React.Component {
static propTypes = {
align: PropTypes.oneOf([
'start',
'center',
'end',
'baseline',
'stretch',
]),
alignContent: PropTypes.oneOf([
'start',
'center',
'end',
'between',
'around',
'stretch',
]),
alignSelf: baseTypes.alignSelf
}
render() {
//...
}
}
How ever, only the 2 in the file defined properties are shown in the props panel. alignSelf (defined in another file) is not show.
There reason why I have this issue is, that I using a UI Framework. They already have created all this propTypes definitions and I just want to reuse it instead of copy and paste it to my source code.
But for any reason it don't works as expected.