Skip to content

Commit 08b5d52

Browse files
Aayush JainAayush Jain
authored andcommitted
Merge branch 'dialog-changes'
2 parents 54ed77e + 41680a8 commit 08b5d52

File tree

4 files changed

+35
-41
lines changed

4 files changed

+35
-41
lines changed

package-lock.json

Lines changed: 12 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/NDialog/NDialog.less

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,16 @@
4949
}
5050

5151
.nitrozen-dialog-footer {
52-
margin: 0 0 24px;
52+
margin: 24px 0 24px;
5353
padding: 0 24px;
5454
height: 36px;
5555
justify-content: flex-end;
5656
.nitrozen-dialog-negative-button {
5757
color: #fa3f4d;
5858
}
59+
.nitrozen-dialog-footer-button-margin{
60+
margin-right: 16px;
61+
}
5962
}
6063

6164
.nitrozen-dialog-body {

src/components/NDialog/NDialog.vue

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,28 @@
2929
</section>
3030
<footer class="nitrozen-dialog-footer">
3131
<slot name="footer">
32+
<nitrozen-button
33+
v-if="positiveButtonLabel"
34+
:theme="`${theme || 'secondary'}`"
35+
v-flat-btn
36+
class="nitrozen-dialog-footer-button-margin"
37+
@click="close(positiveButtonLabel)"
38+
>{{ positiveButtonLabel }}</nitrozen-button
39+
>
3240
<nitrozen-button
3341
v-if="neutralButtonLabel"
34-
theme="secondary"
42+
:theme="`${theme || 'secondary'}`"
43+
class="nitrozen-dialog-footer-button-margin"
3544
@click="close(neutralButtonLabel)"
3645
>{{ neutralButtonLabel }}</nitrozen-button
3746
>
3847
<nitrozen-button
39-
class="nitrozen-dialog-negative-button"
4048
v-if="negativeButtonLabel"
49+
:theme="`${theme || 'secondary'}`"
50+
v-stroke-btn
4151
@click="close(negativeButtonLabel)"
4252
>{{ negativeButtonLabel }}</nitrozen-button
4353
>
44-
<nitrozen-button
45-
v-if="positiveButtonLabel"
46-
@click="close(positiveButtonLabel)"
47-
>{{ positiveButtonLabel }}</nitrozen-button
48-
>
4954
</slot>
5055
</footer>
5156
</div>
@@ -77,6 +82,12 @@ export default {
7782
title: {
7883
type: String,
7984
},
85+
/**
86+
* theme of button
87+
*/
88+
theme: {
89+
type: String
90+
}
8091
},
8192
data: () => {
8293
return {

src/pages/demo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ export default {
988988
break;
989989
case "confirm":
990990
this.$refs["confirm_dialog"].open({
991-
width: "300px",
991+
width: "500px",
992992
positiveButtonLabel: "Delete",
993993
negativeButtonLabel: "Cancel",
994994
neutralButtonLabel: false,

0 commit comments

Comments
 (0)