vn-verdnaturachat/app/containers/UIKit/Context.tsx

18 lines
486 B
TypeScript
Raw Normal View History

2020-02-11 14:01:35 +00:00
import React from 'react';
import { StyleSheet, View } from 'react-native';
2020-02-11 14:01:35 +00:00
import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit';
import { IContext } from './interfaces';
2020-02-11 14:01:35 +00:00
const styles = StyleSheet.create({
container: {
minHeight: 36,
alignItems: 'center',
flexDirection: 'row'
}
});
export const Context = ({ elements, parser }: IContext) => (
<View style={styles.container}>{elements?.map(element => parser?.renderContext(element, BLOCK_CONTEXT.CONTEXT, parser))}</View>
2020-02-11 14:01:35 +00:00
);