-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Upload Icon Design in UploadButton Component #839
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,33 +10,36 @@ | |
<v-btn | ||
v-bind="props" | ||
@click="select" | ||
icon="mdi-upload" | ||
:loading="loading" | ||
:color="btnColor" | ||
:variant="variant" | ||
:width="width" | ||
:class="btnClass" | ||
/> | ||
> | ||
<svg-icon type="mdi" :path="path"></svg-icon> | ||
</v-btn> | ||
</template> | ||
</v-tooltip> | ||
<v-btn | ||
v-else | ||
v-bind="props" | ||
@click="select" | ||
prepend-icon="mdi-upload" | ||
:loading="loading" | ||
:color="btnColor" | ||
:variant="variant" | ||
:width="width" | ||
:class="btnClass" | ||
> | ||
<svg-icon type="mdi" :path="path"></svg-icon> | ||
{{ label }} | ||
</v-btn> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { type PropType } from 'vue' | ||
import { ref } from 'vue' | ||
import SvgIcon from '@jamescoyle/vue-icon' | ||
import { mdiFileDownload } from '@mdi/js' | ||
const props = defineProps({ | ||
accept: { type: String, default: '.yaml,.yml,text/yaml,application/x-yaml' }, | ||
|
@@ -48,6 +51,8 @@ const props = defineProps({ | |
btnClass: { type: String } | ||
}) | ||
const path = mdiFileDownload | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is not needed you can use the import directly in the template There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you @fjogeleit for reviewing! I initially thought it would make more sense by using "download arrow icon" for showing import along with a file icon, thinking it would visually represent "importing" a file (downloading into the playground). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A download icon could also indicate the download of the current content. I am fine using the |
||
const input = ref<HTMLInputElement | null>(null) | ||
const emit = defineEmits(['click']) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks not intuitive to me to use a download icon for an upload functionality