Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const Export = ({
return (
<Menu
width={248}
placement="left-start"
// placement="left-start"
trigger="click"
content={
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const MoveTo = ({
<PinboardMenu
anchorEl={anchorEl}
open={open}
placement="left-start"
// placement="left-start"
metas={metas}
currentMeta={currentMeta}
blockSuiteWorkspace={blockSuiteWorkspace}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const OperationButton = ({
width={256}
anchorEl={anchorEl}
open={operationMenuOpen}
placement="bottom-start"
// placement="bottom-start"
zIndex={menuIndex}
>
<MenuItem
Expand Down Expand Up @@ -143,7 +143,7 @@ export const OperationButton = ({
<PinboardMenu
anchorEl={anchorEl}
open={pinboardMenuOpen}
placement="bottom-start"
// placement="bottom-start"
zIndex={menuIndex}
metas={metas}
currentMeta={currentMeta}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const AffineRemoteCollaborationPanel: React.FC<
</MenuItem>
</>
}
placement="bottom-end"
// placement="bottom-end"
disablePortal={true}
trigger="click"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ export const OperationCell: React.FC<OperationCellProps> = ({
favorite ? t('Removed from Favorites') : t('Added to Favorites')
);
}}
icon={favorite ? <FavoritedIcon /> : <FavoriteIcon />}
icon={
favorite ? (
<FavoritedIcon style={{ color: 'var(--affine-primary-color)' }} />
) : (
<FavoriteIcon />
)
}
>
{favorite ? t('Remove from favorites') : t('Add to Favorites')}
</MenuItem>
Expand Down Expand Up @@ -98,7 +104,7 @@ export const OperationCell: React.FC<OperationCellProps> = ({
<FlexWrapper alignItems="center" justifyContent="center">
<Menu
content={OperationMenu}
placement="bottom-end"
// placement="bottom-end"
disablePortal={true}
trigger="click"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const EditorOptionMenu = () => {
<Menu
width={276}
content={EditMenu}
placement="bottom-end"
// placement="bottom-end"
disablePortal={true}
trigger="click"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const UserAvatar = () => {
<Menu
width={276}
content={EditMenu}
placement="bottom-end"
// placement="bottom-end"
disablePortal={true}
trigger="click"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/pure/help-island/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const HelpIsland = ({
</MuiFade>
</Tooltip>
<MuiFade in={spread}>
<StyledTriggerWrapper>
<StyledTriggerWrapper spread>
<CloseIcon />
</StyledTriggerWrapper>
</MuiFade>
Expand Down
14 changes: 7 additions & 7 deletions apps/web/src/components/pure/help-island/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@ export const StyledIsland = styled('div')<{
transition: 'box-shadow 0.2s',
width: '44px',
position: 'relative',
boxShadow: spread
? '4px 4px 7px rgba(58, 76, 92, 0.04), -4px -4px 13px rgba(58, 76, 92, 0.02), 6px 6px 36px rgba(58, 76, 92, 0.06)'
: 'unset',
boxShadow: spread ? 'var(--affine-menu-shadow)' : 'unset',
padding: '0 4px 44px',
borderRadius: '10px',
background: spread
? 'var(--affine-background-overlay-panel-color)'
: 'transparent',
: 'var(--affine-background-primary-color)',
':hover': {
boxShadow:
'4px 4px 7px rgba(58, 76, 92, 0.04), -4px -4px 13px rgba(58, 76, 92, 0.02), 6px 6px 36px rgba(58, 76, 92, 0.06)',
background: spread ? null : 'var(--affine-white)',
},
'::after': {
content: '""',
Expand Down Expand Up @@ -58,7 +55,9 @@ export const StyledAnimateWrapper = styled('div')(() => ({
overflow: 'hidden',
}));

export const StyledTriggerWrapper = styled('div')(({ theme }) => {
export const StyledTriggerWrapper = styled('div')<{
spread?: boolean;
}>(({ theme, spread }) => {
return {
width: '36px',
height: '36px',
Expand All @@ -70,6 +69,7 @@ export const StyledTriggerWrapper = styled('div')(({ theme }) => {
...positionAbsolute({ left: '4px', bottom: '4px' }),
':hover': {
color: 'var(--affine-primary-color)',
backgroundColor: spread ? 'var(--affine-hover-color)' : null,
},
};
});
2 changes: 1 addition & 1 deletion apps/web/src/components/pure/shortcuts-modal/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const StyledShortcutsModal = styled('div')(({ theme }) => ({
paddingBottom: '28px',
backgroundColor: 'var(--affine-white)',
boxShadow: 'var(--affine-popover-shadow)',
borderRadius: `var(--affine-popover-radius) 0 var(--affine-popover-radius) var(--affine-popover-radius)`,
borderRadius: `var(--affine-popover-radius)`,
overflow: 'auto',
boxRadius: '10px',
position: 'fixed',
Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/components/share-menu/ShareMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const ShareMenu: FC<ShareMenuProps> = props => {
<Menu
content={Share}
visible={open}
placement="bottom-end"
// placement="bottom-end"
trigger={['click']}
width={439}
disablePortal={true}
Expand Down
6 changes: 3 additions & 3 deletions packages/component/src/ui/button/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ export const SIZE_CONFIG = {
[SIZE_SMALL]: {
iconSize: 16,
fontSize: 16,
borderRadius: 6,
borderRadius: 4,
height: 26,
padding: 24,
},
[SIZE_MIDDLE]: {
iconSize: 20,
fontSize: 16,
borderRadius: 6,
borderRadius: 4,
height: 32,
padding: 24,
},
Expand All @@ -24,7 +24,7 @@ export const SIZE_CONFIG = {
fontSize: 16,
height: 38,
padding: 24,
borderRadius: 6,
borderRadius: 4,
},
} as const;

Expand Down
4 changes: 0 additions & 4 deletions packages/component/src/ui/menu/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ export const StyledMenuItem = styled('button')<{
':hover': disabled
? {}
: {
color: 'var(--affine-primary-color)',
backgroundColor: 'var(--affine-hover-color)',
svg: {
color: 'var(--affine-primary-color)',
},
},
};
});
6 changes: 3 additions & 3 deletions packages/theme/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const baseTheme = {
zIndexPopover: '100',

paragraphSpace: '8px',
popoverRadius: '10px',
popoverRadius: '12px',

zoom: '1',
scale: 'calc(1 / var(--affine-zoom))',
Expand All @@ -79,7 +79,7 @@ export const lightTheme = {
backgroundSecondaryColor: 'rgb(251, 250, 252)',
backgroundTertiaryColor: 'rgb(233, 233, 236)',
backgroundCodeBlock: 'rgb(250, 251, 253)',
backgroundModalColor: 'rgba(0, 0, 0, 0.6)',
backgroundModalColor: 'rgba(0, 0, 0, 0.4)',
textPrimaryColor: 'rgb(66, 65, 73)',
textSecondaryColor: 'rgb(142, 141, 145)',
textDisableColor: 'rgb(169, 169, 173)',
Expand Down Expand Up @@ -196,7 +196,7 @@ export const darkTheme = {
backgroundSuccessColor: 'rgba(8, 21, 18, 1)',
backgroundPrimaryColor: 'rgb(20, 20, 20)',
backgroundSecondaryColor: 'rgb(32, 32, 32)',
backgroundModalColor: 'rgba(0, 0, 0, 0.8)',
backgroundModalColor: 'rgba(0, 0, 0, 0.5)',
backgroundOverlayPanelColor: 'rgb(30, 30, 30)',
tagBlue: 'rgba(8, 67, 136, 1)',
tagGreen: 'rgba(44, 108, 63, 1)',
Expand Down