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

IBX-9400: UX fixes for share dialog #1426

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/bundle/Resources/public/js/scripts/core/taggify.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
return this.acceptKeys.includes(key);
}

addTag(name, value) {
addTag(name, value, dataset = {}) {
const tagTemplate = this.listNode.dataset.template;
const renderedTemplate = tagTemplate.replace('{{ name }}', name).replace('{{ value }}', value);
const div = doc.createElement('div');
Expand All @@ -27,6 +27,8 @@

const tag = div.querySelector('.ibexa-taggify__list-tag');

Object.entries(dataset).forEach(([datasetKey, datasetValue]) => (tag.dataset[datasetKey] = datasetValue));

this.attachEventsToTag(tag, value);
this.listNode.insertBefore(tag, this.inputNode);
this.tags.add(value);
Expand Down
10 changes: 10 additions & 0 deletions src/bundle/Resources/public/scss/_taggify.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@
opacity: 0;
}
}

&--danger {
background: $ibexa-color-danger-100;
border-color: $ibexa-color-danger-100;
color: $ibexa-color-danger-600;

.ibexa-icon {
fill: $ibexa-color-danger-600;
}
}
}

&__input {
Expand Down
Loading