mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-06 08:50:50 +08:00
feat: restyle create workspace button
This commit is contained in:
+8
@@ -1,4 +1,5 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@/styles';
|
||||||
|
import { Button } from '@/ui/button';
|
||||||
|
|
||||||
export const StyledModalWrapper = styled('div')(({ theme }) => {
|
export const StyledModalWrapper = styled('div')(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
@@ -53,3 +54,10 @@ export const StyledButtonContent = styled('div')(({ theme }) => {
|
|||||||
margin: '0px 0 32px 0',
|
margin: '0px 0 32px 0',
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const StyledButton = styled(Button)(({ theme }) => {
|
||||||
|
return {
|
||||||
|
width: '260px',
|
||||||
|
justifyContent: 'center',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|||||||
+4
-4
@@ -8,6 +8,7 @@ import {
|
|||||||
StyledModalWrapper,
|
StyledModalWrapper,
|
||||||
StyledInputContent,
|
StyledInputContent,
|
||||||
StyledButtonContent,
|
StyledButtonContent,
|
||||||
|
StyledButton,
|
||||||
} from './style';
|
} from './style';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { ModalCloseButton } from '@/ui/modal';
|
import { ModalCloseButton } from '@/ui/modal';
|
||||||
@@ -26,7 +27,7 @@ export const WorkspaceCreate = ({ open, onClose }: WorkspaceCreateProps) => {
|
|||||||
return (
|
return (
|
||||||
<Modal open={open} onClose={onClose}>
|
<Modal open={open} onClose={onClose}>
|
||||||
<StyledModalWrapper>
|
<StyledModalWrapper>
|
||||||
<ModalCloseButton />
|
<ModalCloseButton onClick={onClose} />
|
||||||
<StyledModalHeader>Create new Workspace</StyledModalHeader>
|
<StyledModalHeader>Create new Workspace</StyledModalHeader>
|
||||||
<StyledTextContent>
|
<StyledTextContent>
|
||||||
Workspaces are shared environments where teams can collaborate. After
|
Workspaces are shared environments where teams can collaborate. After
|
||||||
@@ -40,15 +41,14 @@ export const WorkspaceCreate = ({ open, onClose }: WorkspaceCreateProps) => {
|
|||||||
></Input>
|
></Input>
|
||||||
</StyledInputContent>
|
</StyledInputContent>
|
||||||
<StyledButtonContent>
|
<StyledButtonContent>
|
||||||
<Button
|
<StyledButton
|
||||||
disabled={!workspaceName.length}
|
disabled={!workspaceName.length}
|
||||||
style={{ width: '260px' }}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
createWorkspace({ name: workspaceName, avatar: '' });
|
createWorkspace({ name: workspaceName, avatar: '' });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Create
|
Create
|
||||||
</Button>
|
</StyledButton>
|
||||||
</StyledButtonContent>
|
</StyledButtonContent>
|
||||||
</StyledModalWrapper>
|
</StyledModalWrapper>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
Reference in New Issue
Block a user