mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 05:26:24 +09:00
minor
This commit is contained in:
1 parent
4e53a6e5a3
commit
38efa6f4ab
2 files changed
+17
-14
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
TreeNode,
|
||||
type TreeItemRenderProps,
|
||||
styled,
|
||||
Flex,
|
||||
} from "@webstudio-is/design-system";
|
||||
import { type Publish } from "~/shared/pubsub";
|
||||
import {
|
||||
@@ -71,7 +72,6 @@ const staticTreeProps = {
|
||||
};
|
||||
|
||||
const MenuButton = styled(IconButton, {
|
||||
mr: "$2",
|
||||
color: "$hint",
|
||||
"&:hover, &:focus": { color: "$hiContrast" },
|
||||
variants: {
|
||||
@@ -115,18 +115,21 @@ const PagesPanel = ({
|
||||
<TreeItemBody
|
||||
{...props}
|
||||
suffix={
|
||||
onEdit &&
|
||||
(isEditing ? (
|
||||
<ChevronRightIcon />
|
||||
) : (
|
||||
<MenuButton
|
||||
aria-label="Page settings"
|
||||
parentSelected={isSelected}
|
||||
onClick={() => onEdit(props.itemData.id)}
|
||||
>
|
||||
<MenuIcon />
|
||||
</MenuButton>
|
||||
))
|
||||
onEdit && (
|
||||
<Flex css={{ mr: "$2" }} align="center">
|
||||
{isEditing ? (
|
||||
<ChevronRightIcon />
|
||||
) : (
|
||||
<MenuButton
|
||||
aria-label="Page settings"
|
||||
parentSelected={isSelected}
|
||||
onClick={() => onEdit(props.itemData.id)}
|
||||
>
|
||||
<MenuIcon />
|
||||
</MenuButton>
|
||||
)}
|
||||
</Flex>
|
||||
)
|
||||
}
|
||||
alwaysShowSuffix={isEditing}
|
||||
forceFocus={isEditing}
|
||||
|
||||
@@ -235,7 +235,7 @@ export const TreeItemBody = <Data extends { id: string }>({
|
||||
isExpanded,
|
||||
children,
|
||||
suffix,
|
||||
suffixWidth = suffix ? "24px" : "0",
|
||||
suffixWidth = suffix ? "$sizes$5" : "0",
|
||||
alwaysShowSuffix = false,
|
||||
forceFocus = false,
|
||||
selectionTrigger = "click",
|
||||
|
||||
Reference in new issue
Block a user