superdesk/superdesk-client-core

View on GitHub
scripts/apps/authoring-react/fields/dateline/preview.tsx

Summary

Maintainability
A
2 hrs
Test Coverage
import React from 'react';
import {
    IDatelineFieldConfig,
    IDatelineValueOperational,
    IPreviewComponentProps,
} from 'superdesk-api';

type IProps = IPreviewComponentProps<IDatelineValueOperational, IDatelineFieldConfig>;

export class Preview extends React.PureComponent<IProps> {
    render() {
        if (this.props.value == null) {
            return null;
        }

        return (
            <div>{this.props.value}</div>
        );
    }
}