Skip to content

Commit

Permalink
fix: adapt disabled view for file-list
Browse files Browse the repository at this point in the history
  • Loading branch information
remadex committed Dec 17, 2024
1 parent 26102f5 commit 613ca0c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
3 changes: 2 additions & 1 deletion packages/ember-input-validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@
"./static/upload.svg": "/upload.svg",
"./static/download.svg": "/download.svg",
"./static/delete.svg": "/delete.svg",
"./static/document.svg": "/document.svg"
"./static/document.svg": "/document.svg",
"./static/block.svg": "/block.svg"
},
"app-js": {
"./components/base.js": "./dist/_app_/components/base.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
}

.tpk-file-list-placeholder-container.disabled {
@apply hidden;
@apply cursor-not-allowed;
}

.tpk-file-list-placeholder-container.disabled .tpk-file-list-placeholder-icon {
@apply w-12 h-12;
}

.tpk-file-list-placeholder {
Expand Down Expand Up @@ -49,10 +53,6 @@
@apply space-y-4 mt-4;
}

.tpk-file-list-list.disabled {
@apply mt-0;
}

.tpk-file-list-list-item {
@apply flex items-center space-x-6 px-4 py-2 border border-base-300 rounded;
}
Expand Down Expand Up @@ -81,6 +81,7 @@
@apply flex gap-2 flex-shrink-0;
}

.tpk-file-list-list-item-action button, .tpk-file-list-list-item-action img {
.tpk-file-list-list-item-action button,
.tpk-file-list-list-item-action img {
@apply w-6 h-6;
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ export default class TpkValidationFileListComponent extends Component<TpkValidat
{{on 'drop' this.handleDrop}}
>
<img
src='/upload.svg'
alt='upload'
src={{if @disabled '/block.svg' '/upload.svg'}}
alt={{if @disabled 'block' 'upload'}}
class='tpk-file-list-placeholder-icon'
/>
<div class='tpk-file-list-placeholder'>
{{@placeholder}}
</div>
{{#unless @disabled}}
<div class='tpk-file-list-placeholder'>
{{@placeholder}}
</div>
{{/unless}}
</div>
<TpkValidationErrorsComponent
class='tpk-validation-errors'
Expand Down
5 changes: 5 additions & 0 deletions packages/ember-input-validation/static/block.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 613ca0c

Please sign in to comment.