1
0
mirror of https://github.com/Infisical/infisical.git synced 2025-03-29 22:02:57 +00:00

fixed inactive cancel button

This commit is contained in:
Vladyslav Matsiiako
2024-09-13 21:31:08 -07:00
parent 008e18638f
commit fc4189ba0f
2 changed files with 14 additions and 8 deletions
frontend/src
components/v2/Select
views/Project/MembersPage/components/GroupsTab/components/GroupsSection

@ -50,8 +50,8 @@ export const Select = forwardRef<HTMLButtonElement, SelectProps>(
<SelectPrimitive.Trigger
ref={ref}
className={twMerge(
`inline-flex items-center justify-between rounded-md
bg-mineshaft-900 px-3 py-2 font-inter text-sm font-normal text-bunker-200 outline-none focus:bg-mineshaft-700/80 data-[placeholder]:text-mineshaft-200`,
`inline-flex items-center justify-between rounded-md border border-mineshaft-600
bg-mineshaft-900 px-3 py-2 font-inter text-sm font-normal text-bunker-200 outline-none focus:bg-mineshaft-700/80 data-[placeholder]:text-mineshaft-400`,
className,
isDisabled && "cursor-not-allowed opacity-50"
)}

@ -104,10 +104,11 @@ export const GroupModal = ({ popUp, handlePopUpToggle }: Props) => {
defaultValue={field.value}
{...field}
onValueChange={(e) => onChange(e)}
className="w-full"
className="w-full border border-mineshaft-600"
placeholder="Select group..."
>
{filteredGroupMembershipOrgs.map(({ name, slug, id }) => (
<SelectItem value={slug} key={`org-group-${id}`}>
<SelectItem value={slug} key={`org-group-${id}`} >
{name}
</SelectItem>
))}
@ -131,6 +132,7 @@ export const GroupModal = ({ popUp, handlePopUpToggle }: Props) => {
{...field}
onValueChange={(e) => onChange(e)}
className="w-full"
placeholder="Select role..."
>
{(roles || []).map(({ name, slug }) => (
<SelectItem value={slug} key={`st-role-${slug}`}>
@ -141,7 +143,7 @@ export const GroupModal = ({ popUp, handlePopUpToggle }: Props) => {
</FormControl>
)}
/>
<div className="flex items-center">
<div className="flex items-center mt-6">
<Button
className="mr-4"
size="sm"
@ -151,9 +153,13 @@ export const GroupModal = ({ popUp, handlePopUpToggle }: Props) => {
>
{popUp?.group?.data ? "Update" : "Create"}
</Button>
<Button colorSchema="secondary" variant="plain">
Cancel
</Button>
<Button
colorSchema="secondary"
variant="plain"
onClick={() => handlePopUpToggle("group", false)}
>
Cancel
</Button>
</div>
</form>
) : (