-
-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- updated spacing of elements - modified header and "flag type" - added "collaborators" - refactored tags Co-authored-by: Thomas Heartman <[email protected]>
- Loading branch information
1 parent
b15502e
commit 2ede2a6
Showing
10 changed files
with
339 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...rc/component/feature/FeatureView/FeatureOverview/FeatureOverviewMetaData/AddTagButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import type { FC } from 'react'; | ||
import AddIcon from '@mui/icons-material/Add'; | ||
import { styled } from '@mui/material'; | ||
import PermissionButton from 'component/common/PermissionButton/PermissionButton'; | ||
import { UPDATE_FEATURE } from 'component/providers/AccessProvider/permissions'; | ||
|
||
const StyledAddTagButton = styled(PermissionButton)(({ theme }) => ({ | ||
lineHeight: theme.typography.body1.lineHeight, | ||
borderRadius: theme.shape.borderRadiusExtraLarge, | ||
background: theme.palette.secondary.light, | ||
padding: theme.spacing(0.5, 1), | ||
height: theme.spacing(3.5), | ||
})); | ||
|
||
const StyledAddIcon = styled(AddIcon)(({ theme }) => ({ | ||
fontSize: theme.typography.body2.fontSize, | ||
})); | ||
|
||
type AddTagButtonProps = { | ||
project: string; | ||
onClick: () => void; | ||
}; | ||
|
||
export const AddTagButton: FC<AddTagButtonProps> = ({ project, onClick }) => ( | ||
<StyledAddTagButton | ||
size='small' | ||
permission={UPDATE_FEATURE} | ||
projectId={project} | ||
variant='text' | ||
onClick={onClick} | ||
startIcon={<StyledAddIcon />} | ||
> | ||
Add tag | ||
</StyledAddTagButton> | ||
); |
34 changes: 34 additions & 0 deletions
34
...c/component/feature/FeatureView/FeatureOverview/FeatureOverviewMetaData/Collaborators.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { styled } from '@mui/material'; | ||
import { | ||
AvatarComponent, | ||
AvatarGroup, | ||
} from 'component/common/AvatarGroup/AvatarGroup'; | ||
import type { Collaborator } from 'interfaces/featureToggle'; | ||
import type { FC } from 'react'; | ||
|
||
const StyledAvatarComponent = styled(AvatarComponent)(({ theme }) => ({ | ||
width: theme.spacing(2.5), | ||
height: theme.spacing(2.5), | ||
})); | ||
|
||
const StyledAvatarGroup = styled(AvatarGroup)({ | ||
flexWrap: 'nowrap', | ||
}); | ||
|
||
type CollaboratorsProps = { | ||
collaborators: Collaborator[] | undefined; | ||
}; | ||
|
||
export const Collaborators: FC<CollaboratorsProps> = ({ collaborators }) => { | ||
if (!collaborators || collaborators.length === 0) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<StyledAvatarGroup | ||
users={collaborators} | ||
avatarLimit={9} | ||
AvatarComponent={StyledAvatarComponent} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.