2020-02-11 14:01:35 +00:00
|
|
|
import React from 'react';
|
2021-09-13 20:41:05 +00:00
|
|
|
import { StyleSheet, View } from 'react-native';
|
2022-05-26 14:07:17 +00:00
|
|
|
import { BlockContext } from '@rocket.chat/ui-kit';
|
2020-02-11 14:01:35 +00:00
|
|
|
|
2022-03-16 19:07:49 +00:00
|
|
|
import { IContext } from './interfaces';
|
|
|
|
|
2020-02-11 14:01:35 +00:00
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
minHeight: 36,
|
|
|
|
alignItems: 'center',
|
|
|
|
flexDirection: 'row'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2022-03-16 19:07:49 +00:00
|
|
|
export const Context = ({ elements, parser }: IContext) => (
|
2022-05-26 14:07:17 +00:00
|
|
|
<View style={styles.container}>{elements?.map(element => parser?.renderContext(element, BlockContext.CONTEXT, parser))}</View>
|
2020-02-11 14:01:35 +00:00
|
|
|
);
|