mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-19 17:52:45 +02:00
* refactor: replace react-dnd with custom implementation * refactor: add TextCell, IconCell, and ActionCell * refactor: port environments list to react-table * refactor: change OfflineBolt to PowerSettingsNew * refactor: simplify environment toast text * refactor: improve IToast type type * refactor: improve useSearchHighlightContext naming * refactor: clarify enableDragAndDrop logic
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import { CloudCircle } from '@mui/icons-material';
|
|
import StringTruncator from 'component/common/StringTruncator/StringTruncator';
|
|
import { useStyles } from 'component/environments/EnvironmentCard/EnvironmentCard.styles';
|
|
|
|
interface IEnvironmentProps {
|
|
name: string;
|
|
type: string;
|
|
}
|
|
|
|
const EnvironmentCard = ({ name, type }: IEnvironmentProps) => {
|
|
const { classes: styles } = useStyles();
|
|
return (
|
|
<div className={styles.container}>
|
|
<div className={styles.header}>
|
|
<CloudCircle className={styles.icon} /> Environment
|
|
</div>
|
|
|
|
<div className={styles.infoContainer}>
|
|
<div className={styles.infoInnerContainer}>
|
|
<div className={styles.infoTitle}>Id</div>
|
|
<div>
|
|
<StringTruncator
|
|
text={name}
|
|
maxWidth={'250'}
|
|
maxLength={30}
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div className={styles.infoInnerContainer}>
|
|
<div className={styles.infoTitle}>Type</div>
|
|
<div>{type}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default EnvironmentCard;
|