Skip to content

Commit

Permalink
[ONL-6702] - migrate navigation component to vue3 (#1289)
Browse files Browse the repository at this point in the history
* [ONL-6702] - ref - migrated component props

* [ONL-6702] - ref - removed script

* [ONL-6702] - ref - rm unecessary props attributes

* [ONL-6702] - updated unit tests

* 2.1.2
  • Loading branch information
DisegnAle authored Sep 27, 2022
1 parent 28a2d03 commit 17352d6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 30 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ebury/chameleon-components",
"version": "2.1.1",
"version": "2.1.2",
"main": "src/main.js",
"sideEffects": false,
"author": "Ebury Team (http://labs.ebury.rocks/)",
Expand Down
6 changes: 2 additions & 4 deletions src/components/ec-navigation/ec-navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ describe('EcNavigation', () => {
withMockedConsole((errorSpy, warnSpy) => {
mount(EcNavigation);

expect(warnSpy).toHaveBeenCalledTimes(3);
expect(warnSpy.mock.calls[0][0]).toContain('Missing required prop: "isCollapsed"');
expect(warnSpy.mock.calls[1][0]).toContain('Missing required prop: "isCollapsable"');
expect(warnSpy.mock.calls[2][0]).toContain('Missing required prop: "branding"');
expect(warnSpy).toHaveBeenCalledTimes(1);
expect(warnSpy.mock.calls[0][0]).toContain('Missing required prop: "isCollapsable"');
});
});

Expand Down
41 changes: 18 additions & 23 deletions src/components/ec-navigation/ec-navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,25 @@
</div>
</template>

<script>
export default {
name: 'EcNavigation',
props: {
isCollapsed: {
type: Boolean,
required: true,
default: false,
},
isCollapsable: {
type: Boolean,
required: true,
},
branding: {
type: Object,
default: () => ({}),
required: true,
},
showBrandingLogo: {
type: Boolean,
default: true,
},
<script setup>
defineProps({
isCollapsed: {
type: Boolean,
default: false,
},
};
isCollapsable: {
type: Boolean,
required: true,
},
branding: {
type: Object,
default: () => ({}),
},
showBrandingLogo: {
type: Boolean,
default: true,
},
});
</script>

<style>
Expand Down

1 comment on commit 17352d6

@vercel
Copy link

@vercel vercel bot commented on 17352d6 Sep 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

chameleon – ./

chameleon-ebury.vercel.app
chameleon-git-master-ebury.vercel.app
chameleon-dead-plane.vercel.app

Please sign in to comment.