evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a React component that displays helpful information cards that appear in different directions relative to their trigger buttons.
Create a DirectionalInfoCard component that:
direction prop that can be "top", "right", "bottom", or "left"buttonText prop for the trigger button labelinfoText prop for the information content to displaydirection propimport React from 'react';
export interface DirectionalInfoCardProps {
direction: 'top' | 'right' | 'bottom' | 'left';
buttonText: string;
infoText: string;
}
export function DirectionalInfoCard(props: DirectionalInfoCardProps): React.ReactElement;Provides tooltip positioning and interaction capabilities.
Core React library for building UI components.