From fdd62941527dc186c6a60c4b1b7e2d394b190706 Mon Sep 17 00:00:00 2001 From: Arpit Singh Date: Fri, 26 Jul 2024 10:12:05 +0530 Subject: [PATCH 1/2] Combined primary and secondary button into a single component and edited their all instances in the code to fit the new use case, also edited the readme for the new button component --- README.md | 6 +- package.json | 3 +- .../button/{Primary.vue => Button.vue} | 0 src/components/button/Secondary.vue | 99 ------------------- src/components/button/index.ts | 3 +- src/components/modal/Heading.vue | 4 +- src/components/modal/examples/InputDialog.vue | 10 +- .../modal/examples/NestedDialog.vue | 8 +- src/components/smart/ConfirmModal.vue | 10 +- src/components/smart/Expand.vue | 4 +- src/components/smart/Modal.vue | 4 +- src/components/smart/SlideOver.vue | 4 +- src/components/smart/Windows.vue | 6 +- src/stories/Button.story.vue | 9 +- src/stories/Link.story.vue | 4 +- src/stories/NewModal.story.vue | 8 +- src/stories/Table.story.vue | 4 +- 17 files changed, 35 insertions(+), 151 deletions(-) rename src/components/button/{Primary.vue => Button.vue} (100%) delete mode 100644 src/components/button/Secondary.vue diff --git a/README.md b/README.md index f39121f..f07c3c6 100644 --- a/README.md +++ b/README.md @@ -64,11 +64,11 @@ You can use the components in your Vue templates like this: ```ts ``` @@ -76,7 +76,7 @@ If you're using `unplugin-vue-components` in your project, you can import the co ```ts diff --git a/src/components/button/index.ts b/src/components/button/index.ts index 5da4712..e372044 100644 --- a/src/components/button/index.ts +++ b/src/components/button/index.ts @@ -1,2 +1 @@ -export { default as HoppButtonPrimary } from "./Primary.vue" -export { default as HoppButtonSecondary } from "./Secondary.vue" +export { default as HoppButton } from "./Button.vue" diff --git a/src/components/modal/Heading.vue b/src/components/modal/Heading.vue index 2114a3a..9f689d4 100644 --- a/src/components/modal/Heading.vue +++ b/src/components/modal/Heading.vue @@ -12,7 +12,7 @@
- (HOPP_UI_OPTIONS) ?? {} diff --git a/src/components/modal/examples/InputDialog.vue b/src/components/modal/examples/InputDialog.vue index 46420b3..3b5528d 100644 --- a/src/components/modal/examples/InputDialog.vue +++ b/src/components/modal/examples/InputDialog.vue @@ -12,15 +12,10 @@ /> @@ -30,8 +25,7 @@ import { ref } from "vue" import { HoppModal } from "./../" import { HoppSmartInput, - HoppButtonSecondary, - HoppButtonPrimary, + HoppButton, } from "./../../index" const text = ref("") diff --git a/src/components/modal/examples/NestedDialog.vue b/src/components/modal/examples/NestedDialog.vue index 80fe2fc..e6fdffe 100644 --- a/src/components/modal/examples/NestedDialog.vue +++ b/src/components/modal/examples/NestedDialog.vue @@ -2,7 +2,7 @@ @@ -29,8 +28,7 @@ import { ref } from "vue" import { HoppModal } from "./../" import { - HoppButtonPrimary, - HoppButtonSecondary, + HoppButton, HoppSmartInput, } from "./../../index" diff --git a/src/components/smart/ConfirmModal.vue b/src/components/smart/ConfirmModal.vue index 7dadf74..68f239b 100644 --- a/src/components/smart/ConfirmModal.vue +++ b/src/components/smart/ConfirmModal.vue @@ -14,19 +14,13 @@ @@ -34,7 +28,7 @@ diff --git a/src/stories/Link.story.vue b/src/stories/Link.story.vue index e83d6fe..36f2b40 100644 --- a/src/stories/Link.story.vue +++ b/src/stories/Link.story.vue @@ -5,7 +5,7 @@ - + @@ -13,7 +13,7 @@ diff --git a/src/stories/Button.story.vue b/src/stories/Button.story.vue index 587acbb..f2a560d 100644 --- a/src/stories/Button.story.vue +++ b/src/stories/Button.story.vue @@ -1,7 +1,10 @@