Home Reference Source

src/views/journal/components/TableTitle.js

import React from 'react';
import {Text} from 'react-native';
import {DataTable} from 'react-native-paper';

import {iOSTypography} from '../../../styles/Typography';

/**
 * Component displaying the title cell of a table.
 * @param {Object} props
 * @param {Object} props.style - Style of the table cell
 * @param {string} props.text - Content of the table cell
 * @returns {Object} Title cell of a table
 */
export default function TableTitle(props) {
    // Retrieve props
    const style = props.style;
    const text = props.text;

    return (
        <DataTable.Title style={style}>
            <Text style={iOSTypography.headline}>{text}</Text>
        </DataTable.Title>
    );
}