-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add Link Component #39
Merged
Merged
Changes from 2 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
78ccb53
Add Link Component
mcasamitjana e49cb91
Delete white spaces
mcasamitjana f6780a1
Merge remote-tracking branch 'common/master' into feature/addLink
mcasamitjana 65df4bc
Delete onClick event
mcasamitjana 3b04336
Change <a> to nuxt navigation <n-link>
mcasamitjana c6ef193
Fix lint
mcasamitjana 11c2a81
Merge common/master
mcasamitjana b5855cf
Change lint package.json
mcasamitjana a5bf99d
Merge branch 'master' of github.com:GeeksCAT/anem-per-feina-frontoffi…
mcasamitjana dde569e
Remove h5 header tag
mcasamitjana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Link } from '.' | ||
|
||
export default { | ||
title: 'Components/Link', | ||
component: Link | ||
} | ||
|
||
const Template = (args, { argTypes }) => ({ | ||
props: Object.keys(argTypes), | ||
components: { Link }, | ||
template: '<Link v-bind="$props" />' | ||
}) | ||
|
||
export const Default = Template.bind({}) | ||
Default.args = { | ||
label: 'Software engineer', | ||
destination: 'https://google.es' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<h5> | ||
<a class="Link" | ||
mcmontseny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
:href="destination" | ||
@click="$emit('on-click')"> | ||
mcmontseny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{ label }} | ||
</a> | ||
</h5> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'Link', | ||
props: { | ||
label: { | ||
type: String, | ||
required: true | ||
}, | ||
destination: { | ||
type: String, | ||
required: true | ||
} | ||
}, | ||
emits: ['on-click'] | ||
} | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.Link { | ||
font-family: "Montserrat",Helvetica,Arial,sans-serif; | ||
font-weight: 700; | ||
line-height: 1.2; | ||
text-transform: uppercase; | ||
letter-spacing: 0.1em; | ||
color: #ff7473; | ||
text-decoration: none; | ||
|
||
&:focus, &:hover { | ||
color: #ff2827; | ||
text-decoration: underline; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Link } from './Link.vue' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this h5