@gravity-ui/uikit
Version:
Gravity UI base styling and components
20 lines (19 loc) • 622 B
JavaScript
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { Button } from "../Button/index.js";
import { useAlertContext } from "./useAlertContext.js";
function alertSizeToButtonSize(alertSize) {
switch (alertSize) {
case 's':
case 'm':
return 'm';
case 'l':
default:
return 'l';
}
}
export const AlertAction = (props) => {
const { view, size } = useAlertContext();
return (_jsx(Button, { view: view === 'filled' ? 'normal-contrast' : undefined, size: alertSizeToButtonSize(size), ...props }));
};
//# sourceMappingURL=AlertAction.js.map