Skip to content

Commit

Permalink
1-3158: more layout tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Nov 26, 2024
1 parent 930a2c8 commit 7969bad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { LicensedUsersSidebar } from './LicensedUsersSidebar';

const StyledContainer = styled(Box)(({ theme }) => ({
display: 'flex',
flexDirection: 'row',
flexFlow: 'row wrap',
width: '100%',
justifyContent: 'space-between',
alignItems: 'center',
Expand Down
23 changes: 9 additions & 14 deletions frontend/src/component/admin/users/UsersHeader/UsersHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,29 @@ import { useUiFlag } from 'hooks/useUiFlag';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { LicensedUsersBox } from './LicensedUsersBox';

interface StyledContainerProps {
licensedUsersEnabled: boolean;
}

const StyledContainer = styled(Box)<StyledContainerProps>(
({ theme, licensedUsersEnabled }) => ({
display: 'grid',
gridTemplateColumns: licensedUsersEnabled ? '60% 40%' : '100%',
gap: theme.spacing(2),
paddingBottom: theme.spacing(3),
}),
);
const StyledContainer = styled(Box)(({ theme }) => ({
display: 'flex',
flexFlow: 'row',
gap: theme.spacing(2),
paddingBottom: theme.spacing(3),
}));

const StyledElement = styled(Box)(({ theme }) => ({
backgroundColor: theme.palette.background.paper,
padding: theme.spacing(2, 3, 2, 2),
borderRadius: `${theme.shape.borderRadiusLarge}px`,
border: '2px solid',
borderColor: theme.palette.divider,
flex: 'auto',
}));

export const UsersHeader = () => {
const licensedUsers = useUiFlag('licensedUsers');
const { isOss } = useUiConfig();
const licensedUsersEnabled = true; //licensedUsers && !isOss();
const licensedUsersEnabled = licensedUsers && !isOss();

return (
<StyledContainer licensedUsersEnabled={licensedUsersEnabled}>
<StyledContainer>
<StyledElement>
<InviteLinkBar />
</StyledElement>
Expand Down

0 comments on commit 7969bad

Please sign in to comment.