"use client"; import { useUiText } from "@suphark/ui/components/shared/ui-text"; import { type ComponentProps, forwardRef } from "react"; import { ActionAdd } from "../semantic-icons"; import { ActionButton } from "./base/action-button"; interface AddNewButtonProps extends ComponentProps { /** ค่าเริ่มต้น `UiText.buttons.addNew` ("เพิ่มใหม่") */ label?: string; responsive?: boolean; } export const AddNewButton = forwardRef( ({ label, responsive = false, children, ...props }, ref) => { const text = useUiText(); return ( } responsive={responsive} {...props}> {children || (label ?? text.buttons?.addNew ?? "เพิ่มใหม่")} ); }, ); AddNewButton.displayName = "AddNewButton";