UNPKG

@grafana/ui

Version:
27 lines (24 loc) 702 B
import { jsx } from 'react/jsx-runtime'; import { css } from '@emotion/css'; import { useStyles2 } from '../../../themes/ThemeContext.mjs'; "use strict"; const TimeZoneTitle = ({ title }) => { const styles = useStyles2(getStyles); if (!title) { return null; } return /* @__PURE__ */ jsx("span", { className: styles.title, children: title }); }; const getTimeZoneTitle = (info) => { return info.name.split("/").at(-1).replace(/_/g, " "); }; const getStyles = (theme) => { return { title: css({ fontWeight: theme.typography.fontWeightRegular, textOverflow: "ellipsis" }) }; }; export { TimeZoneTitle, getTimeZoneTitle }; //# sourceMappingURL=TimeZoneTitle.mjs.map