diff --git a/CHANGELOG.md b/CHANGELOG.md index 4db525a..ccd90b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.32.2](https://github.com/Fantom-foundation/Fantom-Vue3-Components/compare/v0.32.1...v0.32.2) (2023-02-08) + + +### Features + +* **FLink:** add `title` and `clas` props ([bb4829f](https://github.com/Fantom-foundation/Fantom-Vue3-Components/commit/bb4829f6ac6f7af5bf93e90e99dd446142baf66b)) + ### [0.32.1](https://github.com/Fantom-foundation/Fantom-Vue3-Components/compare/v0.32.0...v0.32.1) (2023-02-07) diff --git a/package-lock.json b/package-lock.json index d4f6688..6c8ce63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fantom-vue3-components", - "version": "0.32.1", + "version": "0.32.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fantom-vue3-components", - "version": "0.32.1", + "version": "0.32.2", "license": "MIT", "dependencies": { "@vueuse/core": "^8.5.0", diff --git a/package.json b/package.json index 375a65d..8eae6a5 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fantom-vue3-components", - "version": "0.32.1", + "version": "0.32.2", "description": "Library of various Vue 3 components with focus on accessibility", "author": "Fantom Foundation", "license": "MIT", diff --git a/src/components/FLink/FLink.spec.js b/src/components/FLink/FLink.spec.js index eeb9461..70904fd 100644 --- a/src/components/FLink/FLink.spec.js +++ b/src/components/FLink/FLink.spec.js @@ -103,4 +103,26 @@ describe('FLink', () => { const link = wrapper.find('a'); expect(link.attributes().target).toBe('_blank'); }); + + it('should properly set `title` attribute', () => { + wrapper = createWrapper({ + props: { + title: 'foo', + }, + }); + + const link = wrapper.find('a'); + expect(link.attributes().title).toBe('foo'); + }); + + it('should properly set `class` attribute', () => { + wrapper = createWrapper({ + props: { + clas: 'foo', + }, + }); + + const link = wrapper.find('a'); + expect(link.attributes().class).toContain('foo'); + }); }); diff --git a/src/components/FLink/FLink.vue b/src/components/FLink/FLink.vue index 589493c..8e34887 100644 --- a/src/components/FLink/FLink.vue +++ b/src/components/FLink/FLink.vue @@ -33,6 +33,14 @@ const props = defineProps({ type: String, default: defaults.target, }, + title: { + type: String, + default: defaults.title, + }, + clas: { + type: String, + default: defaults.clas, + }, useEllipsis: { type: Boolean, default: defaults.useEllipsis, @@ -58,7 +66,14 @@ const cHref = computed(() => {