2020-02-11 14:01:35 +00:00
|
|
|
import React from 'react';
|
2021-10-01 18:12:19 +00:00
|
|
|
import { StyleSheet, View } from 'react-native';
|
2022-05-30 22:01:25 +00:00
|
|
|
import { BlockContext } from '@rocket.chat/ui-kit';
|
2020-02-11 14:01:35 +00:00
|
|
|
|
2022-03-29 18:53:27 +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-29 18:53:27 +00:00
|
|
|
export const Context = ({ elements, parser }: IContext) => (
|
2022-05-30 22:01:25 +00:00
|
|
|
<View style={styles.container}>{elements?.map(element => parser?.renderContext(element, BlockContext.CONTEXT, parser))}</View>
|
2020-02-11 14:01:35 +00:00
|
|
|
);
|