Skip to content

Commit

Permalink
Add back certain functionality of ActionInput.vue
Browse files Browse the repository at this point in the history
I forgot why I changed this to be honest.

Signed-off-by: Marcel Robitaille <[email protected]>
  • Loading branch information
MarcelRobitaille committed Nov 1, 2022
1 parent 3113618 commit 3febd8f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/components/SimpleActionInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@
-->

<template>
<li class="action">
<li class="action" :class="{ 'action--disabled': disabled }">
<span class="action-input">
<slot name="icon">
<span :class="icon" class="action-input__icon" />
<span
:class="[isIconUrl ? 'action-input__icon--url' : icon]"
:style="{
backgroundImage: isIconUrl ? `url(${icon})` : null,
}"
class="action-input__icon"
/>
</slot>
<form
ref="form"
Expand Down Expand Up @@ -92,6 +98,13 @@ const ActionGlobalMixin = {
},
computed: {
isIconUrl() {
try {
return new URL(this.icon)
} catch (error) {
return false
}
},
isLongText() {
return this.text && this.text.trim().length > 20
},
Expand Down Expand Up @@ -426,7 +439,6 @@ textarea {
// long text area
p {
// in case there are no spaces like long email addresses
overflow: hidden;
max-width: 220px;
Expand Down

0 comments on commit 3febd8f

Please sign in to comment.