Matterway
    Preparing search index...

    Interface ThumbsFeedbackBlockProps

    Thumbs feedback component for user feedback collection. Displays two buttons (thumbs up and thumbs down) that users can click to provide feedback.

    Configuration object

    Name of the thumbs feedback component in the state

    Callback function called when thumbs up is clicked

    Callback function called when thumbs down is clicked

    Whether the component is disabled

    Additional CSS class name

    Basic usage

    thumbsFeedback({
    name: 'userFeedback',
    onThumbsUpClick: () => console.log('Thumbs up!'),
    onThumbsDownClick: () => console.log('Thumbs down!')
    });

    Usage with disabled state

    thumbsFeedback({
    name: 'feedback',
    disabled: true,
    onThumbsUpClick: () => {},
    onThumbsDownClick: () => {}
    });

    Usage inside a group for feedback in success states

    bubble([
    group([
    completion({
    title: 'Task completed successfully',
    description: 'All operations have been completed.'
    }),
    thumbsFeedback({
    name: 'feedback',
    onThumbsUpClick: async () => {
    await ctx.telemetry?.sendEvent('THUMBS_FEEDBACK', {
    feedback: 'ThumbsUpFeedback'
    });
    },
    onThumbsDownClick: async () => {
    await ctx.telemetry?.sendEvent('THUMBS_FEEDBACK', {
    feedback: 'ThumbsDownFeedback'
    });
    }
    })
    ])
    ]);
    interface ThumbsFeedbackBlockProps {
        resolve?: boolean;
        name?: string;
        onDismissClick?: () => void;
        onThumbsUpClick?: () => void;
        onThumbsDownClick?: () => void;
        disabled?: boolean;
        className?: string;
        buttonTexts?: { dismiss?: string };
    }

    Hierarchy

    • Omit<ThumbsFeedbackProps, "resolve">
      • ThumbsFeedbackBlockProps
    Index

    Properties

    resolve?: boolean

    Whether the component should resolve the UI when a button is clicked. Defaults to true.

    name?: string

    Optional name for state management

    onDismissClick?: () => void

    Callback when dismiss is clicked

    onThumbsUpClick?: () => void

    Callback when thumbs up is clicked

    onThumbsDownClick?: () => void

    Callback when thumbs down is clicked

    disabled?: boolean

    Whether the component is disabled

    className?: string

    Custom CSS class name

    buttonTexts?: { dismiss?: string }

    Button texts