opti: topbar style
This commit is contained in:
@@ -173,7 +173,6 @@ const LigoApp = styled('div')({
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
flex: '1 1 0%',
|
flex: '1 1 0%',
|
||||||
backgroundColor: 'white',
|
backgroundColor: 'white',
|
||||||
margin: '10px 0',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const LigoLeftContainer = styled('div')({
|
const LigoLeftContainer = styled('div')({
|
||||||
@@ -184,7 +183,7 @@ const LigoLeftContainer = styled('div')({
|
|||||||
const WorkspaceSidebar = styled('div')(({ hidden }) => ({
|
const WorkspaceSidebar = styled('div')(({ hidden }) => ({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
bottom: '48px',
|
bottom: '48px',
|
||||||
top: '8px',
|
top: '12px',
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ const Container = styled('div')(
|
|||||||
isOnDrag: boolean;
|
isOnDrag: boolean;
|
||||||
}) => ({
|
}) => ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
padding: isWhiteboard ? 0 : `96px ${PADDING_X}px 0 ${PADDING_X}px`,
|
padding: isWhiteboard ? 0 : `72px ${PADDING_X}px 0 ${PADDING_X}px`,
|
||||||
minWidth: isWhiteboard ? 'unset' : '940px',
|
minWidth: isWhiteboard ? 'unset' : '940px',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
...(isOnDrag && {
|
...(isOnDrag && {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export const timestamp = 1658999074664;
|
export const timestamp = 1659000896562;
|
||||||
export * from './image/image';
|
export * from './image/image';
|
||||||
export * from './format-clear/format-clear';
|
export * from './format-clear/format-clear';
|
||||||
export * from './backward-undo/backward-undo';
|
export * from './backward-undo/backward-undo';
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const IconWrapper = styled('div')<Pick<StatusIconProps, 'mode'>>(
|
|||||||
color: theme.affine.palette.primary,
|
color: theme.affine.palette.primary,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
backgroundColor: theme.affine.palette.white,
|
backgroundColor: theme.affine.palette.white,
|
||||||
transform: `translateX(${mode === DocMode.doc ? 0 : 33}px)`,
|
transform: `translateX(${mode === DocMode.doc ? 0 : 20}px)`,
|
||||||
transition: 'transform 300ms ease',
|
transition: 'transform 300ms ease',
|
||||||
|
|
||||||
'& > svg': {
|
'& > svg': {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const Container = styled('div')(({ theme }) => {
|
|||||||
backgroundColor: theme.affine.palette.textHover,
|
backgroundColor: theme.affine.palette.textHover,
|
||||||
borderRadius: '5px',
|
borderRadius: '5px',
|
||||||
height: '30px',
|
height: '30px',
|
||||||
width: '63px',
|
width: '50px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
padding: '5px',
|
padding: '5px',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { IconButton, styled } from '@toeverything/components/ui';
|
import { IconButton, styled } from '@toeverything/components/ui';
|
||||||
import { LogoIcon, SideBarViewIcon } from '@toeverything/components/icons';
|
import {
|
||||||
|
LogoIcon,
|
||||||
|
SideBarViewIcon,
|
||||||
|
SearchIcon,
|
||||||
|
} from '@toeverything/components/icons';
|
||||||
import { useShowSettingsSidebar } from '@toeverything/datasource/state';
|
import { useShowSettingsSidebar } from '@toeverything/datasource/state';
|
||||||
import { CurrentPageTitle } from './Title';
|
import { CurrentPageTitle } from './Title';
|
||||||
import { EditorBoardSwitcher } from './EditorBoardSwitcher';
|
import { EditorBoardSwitcher } from './EditorBoardSwitcher';
|
||||||
@@ -18,9 +22,18 @@ export const LayoutHeader = () => {
|
|||||||
</TitleContainer>
|
</TitleContainer>
|
||||||
</FlexContainer>
|
</FlexContainer>
|
||||||
<FlexContainer>
|
<FlexContainer>
|
||||||
<IconButton onClick={toggleInfoSidebar}>
|
<StyledHelper>
|
||||||
<SideBarViewIcon />
|
<StyledShare>Share</StyledShare>
|
||||||
</IconButton>
|
<div style={{ margin: '0px 12px' }}>
|
||||||
|
<IconButton size="large">
|
||||||
|
<SearchIcon />
|
||||||
|
</IconButton>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<IconButton onClick={toggleInfoSidebar} size="large">
|
||||||
|
<SideBarViewIcon />
|
||||||
|
</IconButton>
|
||||||
|
</StyledHelper>
|
||||||
</FlexContainer>
|
</FlexContainer>
|
||||||
<StyledContainerForEditorBoardSwitcher>
|
<StyledContainerForEditorBoardSwitcher>
|
||||||
<EditorBoardSwitcher />
|
<EditorBoardSwitcher />
|
||||||
@@ -69,6 +82,24 @@ const TitleContainer = styled('div')(({ theme }) => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const StyledHelper = styled('div')({
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
});
|
||||||
|
|
||||||
|
const StyledShare = styled('div')({
|
||||||
|
padding: '10px 12px',
|
||||||
|
fontWeight: 600,
|
||||||
|
fontSize: '14px',
|
||||||
|
color: '#3E6FDB',
|
||||||
|
cursor: 'pointer',
|
||||||
|
|
||||||
|
'&:hover': {
|
||||||
|
background: '#F5F7F8',
|
||||||
|
borderRadius: '5px',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const StyledLogoIcon = styled(LogoIcon)(({ theme }) => {
|
const StyledLogoIcon = styled(LogoIcon)(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
color: theme.affine.palette.primary,
|
color: theme.affine.palette.primary,
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ interface IconButtonProps {
|
|||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
style?: CSSProperties;
|
style?: CSSProperties;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
size?: SizeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const IconButton: FC<PropsWithChildren<IconButtonProps>> = ({
|
export const IconButton: FC<PropsWithChildren<IconButtonProps>> = ({
|
||||||
@@ -56,43 +57,47 @@ export const IconButton: FC<PropsWithChildren<IconButtonProps>> = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const Container = styled('button')(({ theme }) => {
|
const Container = styled('button')<{ size?: SizeType }>(
|
||||||
return {
|
({ theme, size = SIZE_MIDDLE }) => {
|
||||||
display: 'flex',
|
const { iconSize, areaSize } = SIZE_CONFIG[size];
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
width: '32px',
|
|
||||||
height: '32px',
|
|
||||||
backgroundColor: theme.affine.palette.white,
|
|
||||||
color: theme.affine.palette.icons,
|
|
||||||
padding: theme.affine.spacing.iconPadding,
|
|
||||||
borderRadius: '5px',
|
|
||||||
|
|
||||||
'& svg': {
|
return {
|
||||||
width: '20px',
|
|
||||||
height: '20px',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
width: areaSize,
|
||||||
|
height: areaSize,
|
||||||
|
backgroundColor: theme.affine.palette.white,
|
||||||
|
color: theme.affine.palette.icons,
|
||||||
|
padding: theme.affine.spacing.iconPadding,
|
||||||
|
borderRadius: '5px',
|
||||||
|
|
||||||
'&:hover': {
|
'& svg': {
|
||||||
backgroundColor: theme.affine.palette.hover,
|
width: iconSize,
|
||||||
},
|
height: iconSize,
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
|
||||||
[`&${buttonStatus.hover}`]: {
|
'&:hover': {
|
||||||
backgroundColor: theme.affine.palette.hover,
|
backgroundColor: theme.affine.palette.hover,
|
||||||
},
|
},
|
||||||
|
|
||||||
'&:focus': {
|
[`&${buttonStatus.hover}`]: {
|
||||||
color: theme.affine.palette.primary,
|
backgroundColor: theme.affine.palette.hover,
|
||||||
},
|
},
|
||||||
[`&.${buttonStatus.focus}`]: {
|
|
||||||
color: theme.affine.palette.primary,
|
|
||||||
},
|
|
||||||
|
|
||||||
[`&${buttonStatus.disabled}`]: {
|
'&:focus': {
|
||||||
cursor: 'not-allowed',
|
color: theme.affine.palette.primary,
|
||||||
},
|
},
|
||||||
};
|
[`&.${buttonStatus.focus}`]: {
|
||||||
});
|
color: theme.affine.palette.primary,
|
||||||
|
},
|
||||||
|
|
||||||
|
[`&${buttonStatus.disabled}`]: {
|
||||||
|
cursor: 'not-allowed',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user