Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | /**
* BetaFlag - A reusable badge component to highlight beta features
*
* Usage:
* ```tsx
* <BetaFlag />
* ```
*
* Typically placed next to a label or feature name to draw attention to new and experimental features.
*/
import { Chip } from "@mui/material";
import { styled } from "@mui/system";
import { theme } from "theme";
import { useTranslation } from "../i18n";
import { GLOBAL } from "../i18n/namespaces";
const StyledChip = styled(Chip)({
height: 20,
fontSize: "0.625rem",
fontWeight: 700,
textTransform: "uppercase",
letterSpacing: "0.5px",
marginLeft: theme.spacing(1),
background: `linear-gradient(135deg, ${theme.palette.primary.light} 0%, ${theme.palette.secondary.light} 100%)`,
color: theme.palette.common.white,
});
export default function BetaFlag() {
const { t } = useTranslation(GLOBAL);
return <StyledChip label={`✨ ${t("beta")}`} size="small" />;
}
|