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.
Edit Cards group related controls and information together, allowing a user to view and edit the grouped content.
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 { EditCard, EditCardState } from "@servicetitan/anvil2";
const ExampleComponent = () => {
const [state, setState] = useState<EditCardState>("not started");
const onChange = (change: EditCardChange) => {
if (change === "edit") {
setState("in progress");
}
if (change === "save") {
setState("complete");
}
if (change === "cancel") {
setState("not started");
}
};
return <EditCard state={state} headerText="Header" />;
};
import { EditCard } from "@servicetitan/anvil2";
function ExampleComponent() {
return (
<EditCard
headerText="Header"
state="not started"
disableEdit={false}
disableSave={false}
editButtonText="Edit"
saveButtonText="Save"
/>
); }
EditCard PropsWas this page helpful?