Я хочу создать компонент многократного использования, который можно прикрепить к любому краю родительского контейнера. Для справки см. Следующее изображение 
Я не могу использовать flex для блоков, поскольку в родительском контейнере должно быть содержимое, отображаемое за ними
Я пробовал только выравнивание по левому краю, и это не работает так, как я хочу
// styles.js
import { StyleSheet } from 'react-native'
import { COLOR, BORDER_RADIUS } from 'app/constants'
export default StyleSheet.create({
container: {
alignItems: 'center',
},
box: {
borderWidth: 1,
borderColor: COLOR.grey_cl,
borderRadius: BORDER_RADIUS.normal,
backgroundColor: 'red',
},
boxTopAligned: {},
boxRightAligned: {},
boxBottomAligned: {},
containerLeftAligned: {
position: 'absolute',
top: 0,
left: 0,
bottom: 0,
flex: 1,
alignItems: 'stretch',
justifyContent: 'center',
},
boxLeftAligned: {
textAlign: 'center',
left: 0,
transform: [{ rotate: '90deg' }],
},
})
JSX
<View style={[[styles.container, styles.containerLeftAligned]]}>
<View
style={[
HELPER_STYLES.paddingNormal,
HELPER_STYLES.center,
styles.box,
styles.boxLeftAligned,
]}
>
<Text>{props.text}</Text>
</View>
</View>
Что работает, но не совсем так, как я хочу 