forked from cerc-io/snowballtools-base
MemberCard for owner disabled (#66)
* AddMemberDialog remove footer styling from old component * MemberCard for owner disabled (#64)
This commit is contained in:
parent
e12c94e087
commit
583c0b9d26
@ -8,6 +8,7 @@ import { Button } from 'components/shared/Button';
|
|||||||
import { Permission, User } from 'gql-client';
|
import { Permission, User } from 'gql-client';
|
||||||
import { formatAddress } from 'utils/format';
|
import { formatAddress } from 'utils/format';
|
||||||
import { Tag } from 'components/shared/Tag';
|
import { Tag } from 'components/shared/Tag';
|
||||||
|
import { Input } from 'components/shared/Input';
|
||||||
|
|
||||||
const PERMISSION_OPTIONS: SelectOption[] = [
|
const PERMISSION_OPTIONS: SelectOption[] = [
|
||||||
{
|
{
|
||||||
@ -79,9 +80,8 @@ const MemberCard = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`flex p-1 ${!isFirstCard && 'mt-1 border-t border-gray-300'}`}
|
className={`flex p-1 items-center ${!isFirstCard && 'mt-1 border-t border-gray-300'}`}
|
||||||
>
|
>
|
||||||
<div>^</div>
|
|
||||||
<div className="basis-1/2">
|
<div className="basis-1/2">
|
||||||
{member.name && (
|
{member.name && (
|
||||||
<Tooltip content={member.name}>
|
<Tooltip content={member.name}>
|
||||||
@ -96,14 +96,19 @@ const MemberCard = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className="basis-1/2">
|
<div className="basis-1/2">
|
||||||
{!isPending ? (
|
{!isPending ? (
|
||||||
<Select
|
isOwner ? (
|
||||||
options={DROPDOWN_OPTIONS}
|
<Input size="md" value="Owner" disabled />
|
||||||
size="md"
|
) : (
|
||||||
label={isOwner ? 'Owner' : ''}
|
<Select
|
||||||
disabled={isOwner}
|
options={DROPDOWN_OPTIONS}
|
||||||
value={selectedPermission}
|
size="md"
|
||||||
onChange={(value) => handlePermissionChange(value as SelectOption)}
|
placeholder="Select permission"
|
||||||
/>
|
value={selectedPermission}
|
||||||
|
onChange={(value) =>
|
||||||
|
handlePermissionChange(value as SelectOption)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)
|
||||||
) : (
|
) : (
|
||||||
<div className="flex justify-end gap-2">
|
<div className="flex justify-end gap-2">
|
||||||
<div>
|
<div>
|
||||||
@ -113,7 +118,7 @@ const MemberCard = ({
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="md"
|
||||||
iconOnly
|
iconOnly
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setRemoveMemberDialogOpen((prevVal) => !prevVal);
|
setRemoveMemberDialogOpen((prevVal) => !prevVal);
|
||||||
|
Loading…
Reference in New Issue
Block a user