Skip to main content

Common Examples

Basic Usage

Quick action prompt:
import { SmallAction } from "@servicetitan/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)}
    />
  );
}

Without Description

Simple action prompt:
import { SmallAction } from "@servicetitan/ext-atlas";

function SmallActionSimple() {
  return (
    <SmallAction
      recommendationId="rec-456"
      message="Accept this recommendation?"
      onAccept={(id) => handleAccept(id)}
      onReject={(id) => handleReject(id)}
    />
  );
}

Disabled State

Prevent user interaction:
import { SmallAction } from "@servicetitan/ext-atlas";

function SmallActionDisabled() {
  return (
    <SmallAction
      recommendationId="rec-789"
      message="Processing your request..."
      onAccept={handleAccept}
      onReject={handleReject}
      buttonDisabled
    />
  );
}
Last modified on February 12, 2026