You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
509 B
TypeScript
28 lines
509 B
TypeScript
"use client";
|
|
|
|
import { PlusIcon } from "lucide-react";
|
|
|
|
import { Button } from "@/components/ui/button";
|
|
import { PelangganForm } from "./pelanggan-form";
|
|
import React from "react";
|
|
interface Props {
|
|
trigger?: React.ReactElement;
|
|
}
|
|
|
|
export function TambahPelangganButton({ trigger }: Props) {
|
|
return (
|
|
<PelangganForm
|
|
trigger={
|
|
trigger ? (
|
|
trigger
|
|
) : (
|
|
<Button>
|
|
Tambah
|
|
<PlusIcon />
|
|
</Button>
|
|
)
|
|
}
|
|
/>
|
|
);
|
|
}
|