@grafana/ui
Version:
Grafana Components Library
40 lines (37 loc) • 1.23 kB
JavaScript
import { jsxs, jsx } from 'react/jsx-runtime';
import { css, cx } from '@emotion/css';
import { useStyles2 } from '../../themes/ThemeContext.mjs';
"use strict";
const CallToActionCard = ({ message, callToActionElement, footer, className }) => {
const css2 = useStyles2(getStyles);
return /* @__PURE__ */ jsxs("div", { className: cx([css2.wrapper, className]), children: [
message && /* @__PURE__ */ jsx("div", { className: css2.message, children: message }),
callToActionElement,
footer && /* @__PURE__ */ jsx("div", { className: css2.footer, children: footer })
] });
};
const getStyles = (theme) => ({
wrapper: css({
label: "call-to-action-card",
background: theme.colors.background.secondary,
borderRadius: theme.shape.radius.default,
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
flexGrow: 1,
padding: theme.spacing(3),
[theme.breakpoints.down("sm")]: {
padding: theme.spacing(3, 1)
}
}),
message: css({
marginBottom: theme.spacing(3),
fontStyle: "italic"
}),
footer: css({
marginTop: theme.spacing(3)
})
});
export { CallToActionCard };
//# sourceMappingURL=CallToActionCard.mjs.map