1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-04 11:17:02 +02:00
unleash.unleash/frontend/src/component/common/InputCaption/InputCaption.tsx
olav 59c8822cf2 fix: validate feature strategy parameters (#1192)
* refactor: extract InputCaption component

* refactor: split up GeneralStrategy component

* refactor: fill inn more default feature strategy parameter values

* fix: validate feature strategy parameters

* refactor: fix duplicate keys in strategy icon list

* refactor: expand variable names

* refactor: remove unnecessary useMemo

* refactor: use captions instead of tooltips for boolean parameter descriptions

* refactor: improve strategy definition form spacing
2022-08-04 13:34:30 +02:00

24 lines
484 B
TypeScript

import { Box } from '@mui/material';
export interface IInputCaptionProps {
text?: string;
}
export const InputCaption = ({ text }: IInputCaptionProps) => {
if (!text) {
return null;
}
return (
<Box
sx={theme => ({
color: theme.palette.text.secondary,
fontSize: theme.fontSizes.smallerBody,
marginTop: theme.spacing(1),
})}
>
{text}
</Box>
);
};