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

feat(calendarview): initial implementation #100

Closed
wants to merge 1 commit into from
Closed
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 __tests__/Vuent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { isInstalled, countInstalledPlugins } from './utils';
import {
VntAutosuggest,
VntButton,
VntCalendarView,
VntCheckbox,
VntDialog,
VntHeader,
Expand Down Expand Up @@ -39,6 +40,7 @@ describe('Vuent', () => {
test('installs all components', () => {
expect(isInstalled(localVue, VntAutosuggest)).toBe(true);
expect(isInstalled(localVue, VntButton)).toBe(true);
expect(isInstalled(localVue, VntCalendarView)).toBe(true);
expect(isInstalled(localVue, VntCheckbox)).toBe(true);
expect(isInstalled(localVue, VntDialog)).toBe(true);
expect(isInstalled(localVue, VntHeader)).toBe(true);
Expand All @@ -54,7 +56,7 @@ describe('Vuent', () => {
expect(isInstalled(localVue, VntSlider)).toBe(true);
expect(isInstalled(localVue, VntToggle)).toBe(true);

expect(countInstalledPlugins(localVue)).toBe(16);
expect(countInstalledPlugins(localVue)).toBe(17);
});

test('has $vuent instance object', () => {
Expand Down
25 changes: 25 additions & 0 deletions __tests__/calendarview.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { VntCalendarView } from '@/components';
import { isInstalled } from './utils';

describe('CalendarView', () => {
let localVue, wrapper;

beforeAll(() => {
localVue = createLocalVue();
localVue.use(VntCalendarView);
});

test('can be installed separately', () => {
expect(isInstalled(localVue, VntCalendarView)).toBe(true);
});

describe('by default', () => {

beforeAll(() => {
wrapper = shallowMount(VntCalendarView);
});

});

});
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
[
'autosuggest',
'button',
'calendarview',
'checkbox',
'dialog',
'header',
Expand Down
18 changes: 18 additions & 0 deletions src/components/calendarview/CalendarView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<template>
<div class="vnt-calendarview"></div>
</template>

<script>
export default {
name: 'VntCalendarView'
};
</script>

<style lang="scss">
@import '../../scss/mixins/component';
@import '../../scss/mixins/text';

.vnt-calendarview {
@include component-base;
}
</style>
9 changes: 9 additions & 0 deletions src/components/calendarview/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CalendarView

## How to use

```html
<vnt-calendarview>

</vnt-calendarview>
```
7 changes: 7 additions & 0 deletions src/components/calendarview/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import CalendarView from './CalendarView.vue';

CalendarView.install = function (Vue) {
Vue.component(CalendarView.name, CalendarView);
};

export default CalendarView;
1 change: 1 addition & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './Vnt.vue';
export { default as VntAutosuggest } from './autosuggest';
export { default as VntButton } from './button';
export { default as VntCalendarView } from './calendarview';
export { default as VntCheckbox } from './checkbox';
export { default as VntDialog } from './dialog';
export { default as VntHeader } from './header';
Expand Down