mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
* feat: new admin project roles table * small fixes * replace Box in defaultColumn Cell with the new TextCell * refactor: slight adjustments * misc improvements * add HighlightCell * fix: description width * Update src/component/admin/projectRoles/ProjectRoles/ProjectRoleList/ProjectRoleList.tsx Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> * address PR comments, small tooltip fixes * fix: prettier fmt Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
27 lines
1022 B
TypeScript
27 lines
1022 B
TypeScript
import { TextCell } from 'component/common/Table/cells/TextCell/TextCell';
|
|
import { IEnvironment } from 'interfaces/environments';
|
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
|
import { StatusBadge } from 'component/common/StatusBadge/StatusBadge';
|
|
import { Highlighter } from 'component/common/Highlighter/Highlighter';
|
|
import { useSearchHighlightContext } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
|
|
|
|
interface IEnvironmentNameCellProps {
|
|
environment: IEnvironment;
|
|
}
|
|
|
|
export const EnvironmentNameCell = ({
|
|
environment,
|
|
}: IEnvironmentNameCellProps) => {
|
|
const { searchQuery } = useSearchHighlightContext();
|
|
|
|
return (
|
|
<TextCell>
|
|
<Highlighter search={searchQuery}>{environment.name}</Highlighter>
|
|
<ConditionallyRender
|
|
condition={!environment.enabled}
|
|
show={<StatusBadge severity="warning">Disabled</StatusBadge>}
|
|
/>
|
|
</TextCell>
|
|
);
|
|
};
|