import { DefaultButton, IconButton } from 'office-ui-fabric-react/lib-commonjs/Button'; import { Checkbox } from 'office-ui-fabric-react/lib-commonjs/Checkbox'; import { Link } from 'office-ui-fabric-react/lib-commonjs/Link'; import { TextField } from 'office-ui-fabric-react/lib-commonjs/TextField'; import * as React from 'react'; import { FeedbackData, FeedbackSentiment } from '../models'; import classNames from './feedbackPanel.classNames'; export interface FeedbackAttributes { supportUri: string; serviceName: string; communityUri?: string; privacyUri?: string; feedback: FeedbackData; } export interface FeedbackActions { updateFeedback(feedback: FeedbackData); submitFeedback(feedback: FeedbackData); } export type FeedbackProps = FeedbackAttributes & FeedbackActions; function renderCommunityFlyer(props: FeedbackProps): JSX.Element { if (!props.communityUri || !props.serviceName) { return null; } return (

Passionate about shaping the future of {props.serviceName}?{' '} Join our community

); } export const FeedbackFooter = (props: FeedbackProps) => { const sendFeedback = () => props.submitFeedback(props.feedback); const toggleContactable = (x, contactable) => props.updateFeedback({ ...props.feedback, contactable }); return (
{renderCommunityFlyer(props)} Privacy

Submit feedback

); }; export const FeedbackForm = (props: FeedbackProps) => { const clickHappy = () => props.updateFeedback({ ...props.feedback, ...{ sentiment: FeedbackSentiment.happy } }); const clickUnhappy = () => props.updateFeedback({ ...props.feedback, ...{ sentiment: FeedbackSentiment.unhappy } }); const updateComment = (comment: string) => props.updateFeedback({ ...props.feedback, comment }); const iconStyle = { icon: { fontSize: 32 } }; return (

If you need help, please contact Support


Are you satisfied with your experience?

); };