From 7083137c5a3816b039b41a9aa046d417cca705c8 Mon Sep 17 00:00:00 2001 From: iamsivin Date: Thu, 21 Nov 2024 15:48:43 +0530 Subject: [PATCH] chore: Label components --- .../Contacts/ContactLabels/ContactLabels.vue | 50 ++------------ .../components-next/label/AddLabel.vue | 49 +++++++++++++ .../components-next/label/LabelItem.vue | 22 ++++++ .../label/story/AddLabel.story.vue | 27 ++++++++ .../label/story/Label.story.vue | 21 ++++++ .../components-next/label/story/fixtures.js | 68 +++++++++++++++++++ 6 files changed, 194 insertions(+), 43 deletions(-) create mode 100644 app/javascript/dashboard/components-next/label/AddLabel.vue create mode 100644 app/javascript/dashboard/components-next/label/LabelItem.vue create mode 100644 app/javascript/dashboard/components-next/label/story/AddLabel.story.vue create mode 100644 app/javascript/dashboard/components-next/label/story/Label.story.vue create mode 100644 app/javascript/dashboard/components-next/label/story/fixtures.js diff --git a/app/javascript/dashboard/components-next/Contacts/ContactLabels/ContactLabels.vue b/app/javascript/dashboard/components-next/Contacts/ContactLabels/ContactLabels.vue index 2078b2290..6f1c5f11a 100644 --- a/app/javascript/dashboard/components-next/Contacts/ContactLabels/ContactLabels.vue +++ b/app/javascript/dashboard/components-next/Contacts/ContactLabels/ContactLabels.vue @@ -1,10 +1,10 @@ + + diff --git a/app/javascript/dashboard/components-next/label/LabelItem.vue b/app/javascript/dashboard/components-next/label/LabelItem.vue new file mode 100644 index 000000000..b96b9b368 --- /dev/null +++ b/app/javascript/dashboard/components-next/label/LabelItem.vue @@ -0,0 +1,22 @@ + + + diff --git a/app/javascript/dashboard/components-next/label/story/AddLabel.story.vue b/app/javascript/dashboard/components-next/label/story/AddLabel.story.vue new file mode 100644 index 000000000..ea6466feb --- /dev/null +++ b/app/javascript/dashboard/components-next/label/story/AddLabel.story.vue @@ -0,0 +1,27 @@ + + + diff --git a/app/javascript/dashboard/components-next/label/story/Label.story.vue b/app/javascript/dashboard/components-next/label/story/Label.story.vue new file mode 100644 index 000000000..5319d56ae --- /dev/null +++ b/app/javascript/dashboard/components-next/label/story/Label.story.vue @@ -0,0 +1,21 @@ + + + diff --git a/app/javascript/dashboard/components-next/label/story/fixtures.js b/app/javascript/dashboard/components-next/label/story/fixtures.js new file mode 100644 index 000000000..ba61d45bf --- /dev/null +++ b/app/javascript/dashboard/components-next/label/story/fixtures.js @@ -0,0 +1,68 @@ +export const label = { + id: 1, + title: 'delivery', + color: '#A2FDD5', +}; + +export const labelMenuItems = [ + { + label: 'delivery', + value: 3, + thumbnail: { + name: 'delivery', + color: '#A2FDD5', + }, + isSelected: true, + action: 'addLabel', + }, + { + label: 'lead', + value: 6, + thumbnail: { + name: 'lead', + color: '#F161C8', + }, + isSelected: false, + action: 'addLabel', + }, + { + label: 'ops-handover', + value: 4, + thumbnail: { + name: 'ops-handover', + color: '#A53326', + }, + isSelected: false, + action: 'addLabel', + }, + { + label: 'billing', + value: 1, + thumbnail: { + name: 'billing', + color: '#28AD21', + }, + isSelected: false, + action: 'addLabel', + }, + { + label: 'premium-customer', + value: 5, + thumbnail: { + name: 'premium-customer', + color: '#6FD4EF', + }, + isSelected: false, + action: 'addLabel', + }, + { + label: 'software', + value: 2, + thumbnail: { + name: 'software', + color: '#8F6EF2', + }, + isSelected: false, + action: 'addLabel', + }, +];