diff --git a/packages/component/src/components/share-menu/disable-public-link/index.tsx b/packages/component/src/components/share-menu/disable-public-link/index.tsx
index 6765a8a839..f3022a3b61 100644
--- a/packages/component/src/components/share-menu/disable-public-link/index.tsx
+++ b/packages/component/src/components/share-menu/disable-public-link/index.tsx
@@ -1,10 +1,9 @@
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { Modal, ModalCloseButton } from '../../..';
+import { Button } from '../../../ui/button';
import {
- StyledButton,
StyledButtonContent,
- StyledDangerButton,
StyledModalHeader,
StyledModalWrapper,
StyledTextContent,
@@ -33,8 +32,9 @@ export const PublicLinkDisableModal = ({
- {t['Cancel']()}
- {t['Cancel']()}
+
+
diff --git a/packages/component/src/components/share-menu/disable-public-link/style.ts b/packages/component/src/components/share-menu/disable-public-link/style.ts
index 56ff275fa4..c34fccd34c 100644
--- a/packages/component/src/components/share-menu/disable-public-link/style.ts
+++ b/packages/component/src/components/share-menu/disable-public-link/style.ts
@@ -1,4 +1,4 @@
-import { styled, TextButton } from '../../..';
+import { styled } from '../../..';
export const StyledModalWrapper = styled('div')(() => {
return {
@@ -40,24 +40,3 @@ export const StyledButtonContent = styled('div')(() => {
justifyContent: 'center',
};
});
-export const StyledButton = styled(TextButton)(() => {
- return {
- color: 'var(--affine-primary-color)',
- height: '32px',
- background: '#F3F0FF',
- border: 'none',
- borderRadius: '8px',
- padding: '4px 20px',
- };
-});
-export const StyledDangerButton = styled(TextButton)(() => {
- return {
- color: '#FF631F',
- height: '32px',
- background:
- 'linear-gradient(0deg, rgba(255, 99, 31, 0.1), rgba(255, 99, 31, 0.1)), #FFFFFF;',
- border: 'none',
- borderRadius: '8px',
- padding: '4px 20px',
- };
-});
diff --git a/packages/component/src/components/share-menu/share-menu.tsx b/packages/component/src/components/share-menu/share-menu.tsx
index 09ae9f2260..fd9b281321 100644
--- a/packages/component/src/components/share-menu/share-menu.tsx
+++ b/packages/component/src/components/share-menu/share-menu.tsx
@@ -9,12 +9,13 @@ import type { FC } from 'react';
import { useRef } from 'react';
import { useCallback, useState } from 'react';
+import { Button } from '../../ui/button';
import { Menu } from '../../ui/menu/menu';
import { Export } from './export';
import { containerStyle, indicatorContainerStyle, tabStyle } from './index.css';
import { SharePage } from './share-page';
import { ShareWorkspace } from './share-workspace';
-import { StyledIndicator, StyledShareButton, TabItem } from './styles';
+import { StyledIndicator, TabItem } from './styles';
type SharePanel = 'SharePage' | 'Export' | 'ShareWorkspace';
const MenuItems: Record
> = {
SharePage: SharePage,
@@ -134,15 +135,15 @@ export const ShareMenu: FC = props => {
setOpen(false);
}}
>
- {
setOpen(!open);
}}
- isShared={isPublic}
+ type={isPublic ? 'primary' : undefined}
>
{isPublic ? 'Shared' : 'Share'}
-
+
);
};
diff --git a/packages/component/src/components/share-menu/share-page.tsx b/packages/component/src/components/share-menu/share-page.tsx
index 419fd23b00..b182b2b72f 100644
--- a/packages/component/src/components/share-menu/share-page.tsx
+++ b/packages/component/src/components/share-menu/share-page.tsx
@@ -7,7 +7,7 @@ import type { FC } from 'react';
import { useState } from 'react';
import { useCallback, useMemo } from 'react';
-import { toast } from '../..';
+import { Button, toast } from '../..';
import { PublicLinkDisableModal } from './disable-public-link';
import {
descriptionStyle,
@@ -15,26 +15,22 @@ import {
menuItemStyle,
} from './index.css';
import type { ShareMenuProps } from './share-menu';
-import {
- StyledButton,
- StyledDisableButton,
- StyledInput,
- StyledLinkSpan,
-} from './styles';
+import { StyledDisableButton, StyledInput, StyledLinkSpan } from './styles';
export const LocalSharePage: FC = props => {
const t = useAFFiNEI18N();
return (
{t['Shared Pages Description']()}
-
{
props.onEnableAffineCloud(props.workspace as LocalWorkspace);
}}
>
{t['Enable AFFiNE Cloud']()}
-
+
);
};
@@ -74,20 +70,20 @@ export const AffineSharePage: FC = props => {
value={isPublic ? sharingUrl : 'https://app.affine.pro/xxxx'}
/>
{!isPublic && (
-
{t['Create']()}
-
+
)}
{isPublic && (
-
{t['Copy Link']()}
-
+
)}
diff --git a/packages/component/src/components/share-menu/share-workspace.tsx b/packages/component/src/components/share-menu/share-workspace.tsx
index ebd76615ca..6a01f85632 100644
--- a/packages/component/src/components/share-menu/share-workspace.tsx
+++ b/packages/component/src/components/share-menu/share-workspace.tsx
@@ -6,9 +6,9 @@ import { WorkspaceFlavour } from '@affine/env/workspace';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import type { FC } from 'react';
+import { Button } from '../../ui/button';
import { descriptionStyle, menuItemStyle } from './index.css';
import type { ShareMenuProps } from './share-menu';
-import { StyledButton } from './styles';
const ShareLocalWorkspace: FC
> = props => {
const t = useAFFiNEI18N();
@@ -17,14 +17,14 @@ const ShareLocalWorkspace: FC> = props => {
{t['Share Menu Public Workspace Description1']()}
- {
props.onOpenWorkspaceSettings(props.workspace);
}}
>
{t['Open Workspace Settings']()}
-
+
);
};
@@ -42,14 +42,14 @@ const ShareAffineWorkspace: FC<
? t['Share Menu Public Workspace Description2']()
: t['Share Menu Public Workspace Description1']()}
-