// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import PropTypes from 'prop-types';
import { FiSmile, FiMeh, FiFrown } from 'react-icons/fi';
const style = {
verticalAlign: 'middle',
};
export const SentimentIcon = ({ sentiment = 'NEUTRAL', size = '1.5em' }) => {
if (sentiment === 'POSITIVE') {
return ;
}
if (sentiment === 'NEGATIVE') {
return ;
}
return ;
};
SentimentIcon.defaultProps = {
sentiment: 'NEUTRAL',
size: '1.5em',
};
SentimentIcon.propTypes = {
sentiment: PropTypes.oneOf(['POSITIVE', 'NEGATIVE', 'NEUTRAL', 'MIXED']),
size: PropTypes.string,
};
const getSentimentColor = (sentiment) => {
if (sentiment === 'POSITIVE') {
return 'green';
}
if (sentiment === 'NEGATIVE') {
return 'red';
}
return 'gray';
};
export const SentimentIndicator = ({ sentiment = 'NEUTRAL' }) => (
{` ${sentiment.charAt(0)}${sentiment.slice(1).toLowerCase()} `}
);
SentimentIndicator.defaultProps = {
sentiment: 'NEUTRAL',
};
SentimentIndicator.propTypes = {
sentiment: PropTypes.oneOf(['POSITIVE', 'NEGATIVE', 'NEUTRAL', 'MIXED']),
};