Skip to content
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

Feature/ui-photo fixed #5

Merged
merged 11 commits into from
Oct 12, 2020
Merged

Feature/ui-photo fixed #5

merged 11 commits into from
Oct 12, 2020

Conversation

AsikNasik
Copy link
Contributor

No description provided.

src/utils/error-handler.js Outdated Show resolved Hide resolved

async validateFile (file) {
if (!this.isValidFileType(file)) {
this.$emit('error')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's provide a prop with a handler for each. type of error. should be possible to do smth like:

<ui-photo
 @err-invalid-file-size="someHandler"
 @err-invalid-file-type="someAnotherHandler"
 @err-invalid-file-dimensions="oneMoreHandler"
/>

src/components/UiPhoto/index.vue Outdated Show resolved Hide resolved
labelMain: { type: String, default: 'Logo (Optional)' },
labelTitle: { type: String, default: 'Drag a file here or click to browse' },
labelFileName: { type: String, default: 'Selected file: ' },
labelDraged: { type: String, default: 'Drag another file or click to browse' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use slots for placing text

src/components/UiPhoto/index.vue Outdated Show resolved Hide resolved
src/components/UiPhoto/index.vue Outdated Show resolved Hide resolved
@@ -1,6 +1,10 @@
<template>
<div class="ui-text" :for="inputId">
<span class="ui-text__dock ui-text__dock_left" v-if="hasSlot('dock-left')">
<div
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update ui-text component soon, so please rollback these changes to avoid conflicts on merge

@quinn71 quinn71 merged commit 9431a5c into master Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants