2020-09-27 13:05:26 +05:00
|
|
|
import React from 'react';
|
|
|
|
|
import {Text, View} from 'react-native';
|
|
|
|
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
|
|
|
import {useTracked} from '../../provider';
|
2020-11-14 10:02:56 +05:00
|
|
|
import {SIZE, WEIGHT} from '../../utils/SizeUtils';
|
2020-11-20 01:23:05 +05:00
|
|
|
import Heading from '../Typography/Heading';
|
|
|
|
|
import Paragraph from '../Typography/Paragraph';
|
2020-09-27 13:05:26 +05:00
|
|
|
|
2020-09-27 13:14:24 +05:00
|
|
|
const DialogHeader = ({icon, title, paragraph}) => {
|
2020-09-27 13:05:26 +05:00
|
|
|
const [state, dispatch] = useTracked();
|
|
|
|
|
const colors = state.colors;
|
|
|
|
|
|
|
|
|
|
return (
|
2020-09-27 13:14:24 +05:00
|
|
|
<>
|
|
|
|
|
<View
|
2020-09-27 13:05:26 +05:00
|
|
|
style={{
|
2020-09-27 13:14:24 +05:00
|
|
|
flexDirection: 'row',
|
|
|
|
|
alignItems: 'center',
|
2020-09-27 13:05:26 +05:00
|
|
|
}}>
|
2020-11-14 10:02:56 +05:00
|
|
|
{/* {icon ? (
|
2020-09-27 13:14:24 +05:00
|
|
|
<Icon name={icon} color={colors.accent} size={SIZE.lg} />
|
2020-11-14 10:02:56 +05:00
|
|
|
) : null} */}
|
2020-11-20 01:23:05 +05:00
|
|
|
<Heading size={SIZE.xl}>{title}</Heading>
|
2020-09-27 13:14:24 +05:00
|
|
|
</View>
|
2020-11-14 10:02:56 +05:00
|
|
|
|
2020-09-27 13:14:24 +05:00
|
|
|
{paragraph ? (
|
2020-11-20 01:23:05 +05:00
|
|
|
<Paragraph color={colors.icon}>{paragraph}</Paragraph>
|
2020-09-27 13:14:24 +05:00
|
|
|
) : null}
|
|
|
|
|
</>
|
2020-09-27 13:05:26 +05:00
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2020-09-27 13:14:24 +05:00
|
|
|
export default DialogHeader;
|