botframework-webchat-component
Version:
React component of botframework-webchat
22 lines (15 loc) • 500 B
JavaScript
import { hooks } from 'botframework-webchat-api';
import PropTypes from 'prop-types';
import React from 'react';
const { useLocalizer } = hooks;
const TextAttachment = ({ attachment: { content = '' } = {} }) => {
const localize = useLocalizer();
const label = localize('ATTACHMENT_TEXT', content);
return <article>{label}</article>;
};
TextAttachment.propTypes = {
attachment: PropTypes.shape({
content: PropTypes.string.isRequired
}).isRequired
};
export default TextAttachment;