diff --git a/src/components/Navigations/PathNode.css b/src/components/Navigations/PathNode.css index 662c332..f146f6d 100644 --- a/src/components/Navigations/PathNode.css +++ b/src/components/Navigations/PathNode.css @@ -8,6 +8,18 @@ margin-left: 1rem; } +.path-toggle { + background-color: #e4a4d8; + width: 1.5rem; + display: inline-flex; + align-items: center; + justify-content: center; + text-align: center; + border-radius: 1rem; + font-size: 1rem; + color: #ffffff; +} + .path-node > .has-text-weight-bold { display: inline-flex; align-items: center; @@ -48,6 +60,7 @@ width: 100%; } + .move-forward { background-color: #c0fff0 !important; border-color: #c0fbc0 !important; diff --git a/src/components/Navigations/PathNode.js b/src/components/Navigations/PathNode.js index 9ad5605..798ca92 100644 --- a/src/components/Navigations/PathNode.js +++ b/src/components/Navigations/PathNode.js @@ -20,6 +20,11 @@ const PathNode = ({ path, isRoot = false }) => { const movePath = useMovePath(); const moveMarkdown = useMoveMarkdown(); + + const expand = () => { + if(!isExpanded) + setIsExpanded(true); + }; const toggleExpand = () => { setIsExpanded(!isExpanded); }; @@ -68,20 +73,23 @@ const PathNode = ({ path, isRoot = false }) => { return (
  • -
    +
    + + {isExpanded ? "-" : "+"} + {isEditing ? ( -
    - setNewName(e.target.value)} - /> -
    +
    + setNewName(e.target.value)} + /> +
    ) : ( { indexMarkdown ? (