Skip to content

Commit

Permalink
fix(edit-node): edit node size according to figma
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Oct 11, 2024
1 parent 851bd3f commit 6d9326c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
41 changes: 22 additions & 19 deletions src/components/ModalsContainer/EditNodeNameModal/Body/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, Skeleton } from '@mui/material'
import { useEffect, useState } from 'react'
import React, { useEffect, useState } from 'react'
import { FormProvider, useForm } from 'react-hook-form'
import { ClipLoader } from 'react-spinners'
import styled from 'styled-components'
Expand Down Expand Up @@ -125,17 +125,21 @@ export const Body = () => {
) : (
<TitleEditor />
)}
<Flex direction="row" mt={18}>
<DeleteButton
color="secondary"
disabled={topicIsLoading || !node}
onClick={handleDelete}
size="large"
variant="contained"
>
Delete
</DeleteButton>
<SaveButton

<Flex direction="row" justify="space-between" mt={20}>
<Flex direction="column">
<DeleteButton
color="secondary"
disabled={topicIsLoading || !node}
onClick={handleDelete}
size="large"
variant="contained"
>
Delete
</DeleteButton>
</Flex>

<CustomButton
color="secondary"
disabled={shouldDisableSave}
onClick={handleSave}
Expand All @@ -148,7 +152,7 @@ export const Body = () => {
<ClipLoader color={colors.lightGray} size={12} />
</ClipLoaderWrapper>
)}
</SaveButton>
</CustomButton>
</Flex>
</FormProvider>
</Wrapper>
Expand All @@ -175,12 +179,11 @@ const DeleteButton = styled(Button)`
}
`

const SaveButton = styled(Button)`
&& {
flex: 1;
}
const ClipLoaderWrapper = styled.span`
margin-top: 4px;
`

const ClipLoaderWrapper = styled.span`
margin-top: 3px;
const CustomButton = styled(Button)`
width: 80% !important;
margin: 0 auto !important;
`
2 changes: 1 addition & 1 deletion src/components/ModalsContainer/EditNodeNameModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const EditNodeNameModal = () => {
const { close } = useModal('editNodeName')

return (
<BaseModal id="editNodeName" kind="large" onClose={close} preventOutsideClose>
<BaseModal id="editNodeName" kind="regular" onClose={close} preventOutsideClose>
<Body />
</BaseModal>
)
Expand Down

0 comments on commit 6d9326c

Please sign in to comment.