css optimize

This commit is contained in:
Qing 2023-01-07 09:52:11 +08:00
parent a97f48220d
commit a7382807be
5 changed files with 17 additions and 9 deletions

View File

@ -158,7 +158,7 @@ export default function FileManager(props: Props) {
return ( return (
<Modal <Modal
onClose={onClose} onClose={onClose}
title={`Files(${photos.length})`} title={`Images (${photos.length})`}
className="file-manager-modal" className="file-manager-modal"
show={show} show={show}
> >

View File

@ -36,9 +36,7 @@ const ImageResizeScale = () => {
className="sub-setting-block" className="sub-setting-block"
title="Resize" title="Resize"
titleSuffix={ titleSuffix={
<div <div className="resize-title-tile">{` ${scaledWidth()}x${scaledHeight()}`}</div>
style={{ width: 86 }}
>{`(${scaledWidth()}x${scaledHeight()})`}</div>
} }
desc="Resize the image before inpainting, the area outside the mask will not lose quality." desc="Resize the image before inpainting, the area outside the mask will not lose quality."
input={ input={

View File

@ -83,3 +83,9 @@
padding-top: 10px; padding-top: 10px;
} }
} }
.resize-title-tile {
width: 86px;
font-size: 0.5rem;
color: var(--text-color-gray);
}

View File

@ -19,7 +19,6 @@ import ImageResizeScale from './ImageResizeScale'
const INPUT_WIDTH = 30 const INPUT_WIDTH = 30
// TODO: 添加收起来的按钮
const SidePanel = () => { const SidePanel = () => {
const [open, toggleOpen] = useToggle(true) const [open, toggleOpen] = useToggle(true)
const [setting, setSettingState] = useRecoilState(settingState) const [setting, setSettingState] = useRecoilState(settingState)

View File

@ -35,8 +35,8 @@ const Button: React.FC<ButtonProps> = props => {
onClick?.() onClick?.()
} }
const renderButton = () => {
return ( return (
<Tooltip content={toolTip}>
<div <div
role="button" role="button"
style={style} style={style}
@ -60,8 +60,13 @@ const Button: React.FC<ButtonProps> = props => {
{icon} {icon}
{children ? <span>{children}</span> : null} {children ? <span>{children}</span> : null}
</div> </div>
</Tooltip>
) )
}
if (toolTip) {
return <Tooltip content={toolTip}>{renderButton()}</Tooltip>
}
return renderButton()
} }
Button.defaultProps = { Button.defaultProps = {