- Updated CancelButton and SubmitButton to use i18next for localization. - Modified DataTableColumnHeader and DataTableFacetedFilter to include translations for sorting and filtering messages. - Enhanced DataTableSelectionColumn with localized aria-labels for accessibility. - Localized titles and messages in SimpleEmptyState and ErrorOverlay components. - Updated LayoutHeader to use i18next for navigation toggle label. - Integrated i18next into useLogout for error messages. - Localized alert dialog actions in useRemoveAlertDialog. - Added new translations in en.json and es.json for various UI components. - Updated breadcrumb and carousel components to use localized strings. - Enhanced pagination component with i18next for navigation labels. - Localized sheet component close button text.
17 lines
409 B
TypeScript
17 lines
409 B
TypeScript
import { Button, ButtonProps } from "@/ui";
|
|
import { t } from "i18next";
|
|
|
|
export interface CancelButtonProps extends ButtonProps {
|
|
label?: string;
|
|
}
|
|
|
|
export const CancelButton = ({ label = t("common.cancel"), ...props }: CancelButtonProps): JSX.Element => {
|
|
return (
|
|
<Button type='button' variant='secondary' {...props}>
|
|
{label}
|
|
</Button>
|
|
);
|
|
};
|
|
|
|
CancelButton.displayName = "CancelButton";
|