Documentation Index
Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt
Use this file to discover all available pages before exploring further.
SmallAction displays quick accept/reject prompts for recommendations.
Documentation Index
Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt
Use this file to discover all available pages before exploring further.
import { SmallAction } from "@servicetitan/anvil2-ext-atlas";
function SmallActionExample() {
return (
<SmallAction
recommendationId="rec-123"
message="Would you like to apply this discount?"
description="10% off for returning customers"
onAccept={(id) => applyRecommendation(id)}
onReject={(id) => dismissRecommendation(id)}
/>
);
}
import { SmallAction } from "@servicetitan/anvil2-ext-atlas";
function SmallActionSimple() {
return (
<SmallAction
recommendationId="rec-456"
message="Accept this recommendation?"
onAccept={(id) => handleAccept(id)}
onReject={(id) => handleReject(id)}
/>
);
}
import { SmallAction } from "@servicetitan/anvil2-ext-atlas";
function SmallActionDisabled() {
return (
<SmallAction
recommendationId="rec-789"
message="Processing your request..."
onAccept={handleAccept}
onReject={handleReject}
buttonDisabled
/>
);
}
<SmallAction
recommendationId="rec-123"
message="Apply discount?"
description="10% off"
onAccept={handleAccept}
onReject={handleReject}
buttonDisabled={false}
/>
SmallAction PropsWas this page helpful?