Skip to content

Commit

Permalink
feat(graph): image set
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Oct 7, 2021
1 parent e4e8999 commit 353def7
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions src/components/editor/aside/graph/AsideGraphItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
v-if="
props.type !== 'paragraph' &&
props.type !== 'page-break' &&
props.type !== 'line-break' &&
props.type !== 'image'
props.type !== 'line-break'
"
class="
dark:hover:bg-gray-800
Expand All @@ -21,14 +20,22 @@
props.type === 'heading-two' || props.type === 'heading-three'
? 'flex items-end border-l border-black dark:border-gray-500 ml-1'
: '',
props.type === 'image'
? 'flex items-end border-l border-black dark:border-gray-500 ml-1'
: '',
]"
>
<div
v-if="props.type === 'heading-two' || props.type === 'heading-three'"
v-if="
props.type === 'heading-two' ||
props.type === 'heading-three' ||
props.type === 'image'
"
:class="[props.type === 'heading-two' ? 'w-6' : 'w-12']"
class="border-b mb-2 h-1 border-black dark:border-gray-500"
></div>
<p
v-if="props.type !== 'image'"
class="ml-2 truncate"
:class="[
props.type === 'heading-one' ? 'text-tiny py-2 font-bold' : '',
Expand All @@ -38,6 +45,20 @@
>
{{ props.raw }}
</p>
<HeroIcon v-else class="ml-2 wb-text">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-7 w-7"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z"
clip-rule="evenodd"
/>
</svg>
</HeroIcon>
</div>
</template>

Expand Down

0 comments on commit 353def7

Please sign in to comment.