1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
unleash.unleash/frontend/src/component/common/EnvironmentIcon/EnvironmentIcon.tsx
Fredrik Strand Oseberg c0da8ed6bc Feat/new toggle overview (#497)
* feat: toggle overview accordions

* feat: accordion metrics

* feat: result

* add permission button

* fix: remove feature environment container from strategies tab

* chore: delete unused code

* fix: remove console log

* fix: remove unused code

* fix: cleanup

* fix: refactor

* fix: add empty states

* fix: loading

* feat: mobile accordions

* fix: button

* fix: strategies

* fix: cleanup

* fix: remove unused params

* fix: strategy button container

* fix: alter gradual rollout id

* fix: update userid strategy item

* fix: string truncator

* fix: strategy link

* fix: strategies tab

* fix: remove unused imports

* fix: visual improvements

* fix: add border
2021-11-12 11:47:19 +01:00

40 lines
903 B
TypeScript

import { useTheme } from '@material-ui/core/styles';
import { Cloud } from '@material-ui/icons';
interface IEnvironmentIcon {
enabled: boolean;
className?: string;
}
const EnvironmentIcon = ({ enabled, className }: IEnvironmentIcon) => {
const theme = useTheme();
const container = {
backgroundColor: enabled
? theme.palette.primary.light
: theme.palette.grey[600],
borderRadius: '50%',
width: '28px',
height: '28px',
minWidth: '28px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
marginRight: '0.5rem',
};
const icon = {
fill: '#fff',
width: '17px',
height: '17px',
};
return (
<div style={container} className={className}>
<Cloud style={icon} />
</div>
);
};
export default EnvironmentIcon;