Skip to content
Open
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
241 changes: 59 additions & 182 deletions dist/nitrozen.common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/nitrozen.common.js.map

Large diffs are not rendered by default.

249 changes: 63 additions & 186 deletions dist/nitrozen.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/nitrozen.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/nitrozen.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/nitrozen.umd.min.js.map

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions src/components/NBtn/NBtn.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<script>
import NButtonContent from './NBtnContent';
import strokeBtn from './../../directives/NStrokeBtn.js'
import flatBtn from './../../directives/NFlatBtn.js'

export default {
name: 'nitrozen-button',
components: {
NButtonContent
},
directives: {
strokeBtn,
flatBtn
},
props: {
href: {
type: String,
Expand Down Expand Up @@ -45,13 +39,24 @@ export default {
},
icon: {
type: String
},
flat: {
type: Boolean,
default: false
},
stroke: {
type: Boolean,
default: false
}
},
render(createElement) {
const slotElement = createElement('n-button-content', {
props: {
showProgress: this.showProgress,
icon: this.icon
icon: this.icon,
flat: this.flat,
stroke: this.stroke,
theme: this.theme
}
}, this.$slots.default)

Expand Down
24 changes: 23 additions & 1 deletion src/components/NBtn/NBtnContent.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="n-button-content" :class="{'disable-click':showProgress}">
<div class="n-button-content" :class="nitrozenButtonClass">
<div class="social-icon" v-if="icon">
<img v-if="icon == 'facebook'" src="./../../assets/facebook-icon.png">
<!-- <img v-if="icon == 'bag'" src="./../../assets/Bag_Icon.svg"> -->
Expand All @@ -21,6 +21,28 @@ export default {
},
icon: {
type: String
},
flat: {
type: Boolean
},
stroke: {
type: Boolean
},
theme: {
type: String
}
},
computed: {
nitrozenButtonClass() {
return {
'disable-click':this.showProgress,
'n-flat-button': this.flat == true,
'n-flat-button-primary': this.flat == true && this.theme == 'primary',
'n-flat-button-secondary': this.flat == true && this.theme == 'secondary',
'n-button-stroke': this.stroke == true,
'n-button-stroke-primary': this.stroke == true && this.theme == 'primary',
'n-button-stroke-secondary': this.stroke == true && this.theme == 'secondary',
}
}
}
}
Expand Down
7 changes: 0 additions & 7 deletions src/components/NDialog/NDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<nitrozen-button
v-if="positiveButtonLabel"
:theme="`${theme || 'secondary'}`"
v-flatBtn
class="nitrozen-dialog-footer-button-margin"
@click="close(positiveButtonLabel)"
>{{ positiveButtonLabel }}</nitrozen-button
Expand All @@ -47,7 +46,6 @@
<nitrozen-button
v-if="negativeButtonLabel"
:theme="`${theme || 'secondary'}`"
v-strokeBtn
@click="close(negativeButtonLabel)"
>{{ negativeButtonLabel }}</nitrozen-button
>
Expand All @@ -62,17 +60,12 @@
import NitrozenUuid from "./../../utils/NUuid";
import NitrozenButton from "./../NBtn";
import NitrozenInline from "./../NInline";
import { flatBtn, strokeBtn } from "./../../directives/index";
export default {
name: "nitrozen-dialog",
components: {
NitrozenButton,
NitrozenInline,
},
directives: {
flatBtn,
strokeBtn,
},
props: {
/**
* Unique identifier
Expand Down
4 changes: 0 additions & 4 deletions src/components/NMenu/NMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@

<script>
import NitrozenUuid from "./../../utils/NUuid";
import clickOutside from "./../../directives/NClickOutside";
import NitrozenInline from "../NInline";
export default {
name: "nitrozen-menu",
directives: {
clickOutside,
},
components: {
"nitrozen-inline": NitrozenInline,
},
Expand Down
38 changes: 0 additions & 38 deletions src/directives/NClickOutside.js

This file was deleted.

23 changes: 0 additions & 23 deletions src/directives/NFlatBtn.js

This file was deleted.

23 changes: 0 additions & 23 deletions src/directives/NStrokeBtn.js

This file was deleted.

21 changes: 0 additions & 21 deletions src/directives/index.js

This file was deleted.

3 changes: 1 addition & 2 deletions src/entry-lib.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

// export * from './components/NSnackbar';

export * from './components';
export * from './directives';
export * from './components';
14 changes: 7 additions & 7 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module '@gofynd/nitrozen-vue' {
import { DirectiveOptions, VueConstructor } from 'vue'
import { VueConstructor } from 'vue'
import * as Nitrozen from '@gofynd/nitrozen-vue'

// Components
Expand All @@ -25,9 +25,9 @@ declare module '@gofynd/nitrozen-vue' {
const NitrozenCustomForm: VueConstructor

// Directives
const strokeBtn: DirectiveOptions
const flatBtn: DirectiveOptions
const clickOutside: DirectiveOptions
// const strokeBtn: DirectiveOptions
// const flatBtn: DirectiveOptions
// const clickOutside: DirectiveOptions

export default Nitrozen
export {
Expand All @@ -52,8 +52,8 @@ declare module '@gofynd/nitrozen-vue' {
NitrozenTooltip,
NitrozenCustomForm,

strokeBtn,
flatBtn,
clickOutside
// strokeBtn,
// flatBtn,
// clickOutside
}
}