feat: restyle create workspace button

This commit is contained in:
MingLiang Wang
2022-12-19 14:20:04 +08:00
parent abbe1dc014
commit 1afdd3bf16
2 changed files with 12 additions and 4 deletions
@@ -1,4 +1,5 @@
import { styled } from '@/styles';
import { Button } from '@/ui/button';
export const StyledModalWrapper = styled('div')(({ theme }) => {
return {
@@ -53,3 +54,10 @@ export const StyledButtonContent = styled('div')(({ theme }) => {
margin: '0px 0 32px 0',
};
});
export const StyledButton = styled(Button)(({ theme }) => {
return {
width: '260px',
justifyContent: 'center',
};
});
@@ -8,6 +8,7 @@ import {
StyledModalWrapper,
StyledInputContent,
StyledButtonContent,
StyledButton,
} from './style';
import { useState } from 'react';
import { ModalCloseButton } from '@/ui/modal';
@@ -26,7 +27,7 @@ export const WorkspaceCreate = ({ open, onClose }: WorkspaceCreateProps) => {
return (
<Modal open={open} onClose={onClose}>
<StyledModalWrapper>
<ModalCloseButton />
<ModalCloseButton onClick={onClose} />
<StyledModalHeader>Create new Workspace</StyledModalHeader>
<StyledTextContent>
Workspaces are shared environments where teams can collaborate. After
@@ -40,15 +41,14 @@ export const WorkspaceCreate = ({ open, onClose }: WorkspaceCreateProps) => {
></Input>
</StyledInputContent>
<StyledButtonContent>
<Button
<StyledButton
disabled={!workspaceName.length}
style={{ width: '260px' }}
onClick={() => {
createWorkspace({ name: workspaceName, avatar: '' });
}}
>
Create
</Button>
</StyledButton>
</StyledButtonContent>
</StyledModalWrapper>
</Modal>