@ec-europa/ecl-links
Advanced tools
Comparing version 0.6.1 to 0.7.0
@@ -5,2 +5,67 @@ module.exports = { | ||
status: 'ready', | ||
tags: ['atom'], | ||
collated: true, | ||
collator(markup, item) { | ||
return ` | ||
<!-- Start: @${item.handle} -->\n | ||
<div>Lorem ipsum, ${markup} consectetur adipiscing elit</div>\n | ||
<!-- End: @${item.handle} -->\n | ||
`; | ||
}, | ||
variants: [ | ||
{ | ||
name: 'default', | ||
label: 'Default', | ||
context: { | ||
href: '#', | ||
label: 'in-line link', | ||
}, | ||
}, | ||
{ | ||
name: 'external', | ||
label: 'External', | ||
context: { | ||
variant: 'external', | ||
href: '#', | ||
label: 'external link', | ||
}, | ||
}, | ||
{ | ||
name: 'standalone', | ||
label: 'Standalone', | ||
context: { | ||
variant: 'standalone', | ||
href: '#', | ||
label: 'standalone link', | ||
}, | ||
}, | ||
{ | ||
name: 'inverted', | ||
label: 'Inverted', | ||
context: { | ||
variant: 'inverted', | ||
extra_class: 'ecl-u-bg-shade', | ||
href: '#', | ||
label: 'inverted link', | ||
}, | ||
}, | ||
{ | ||
name: 'all', | ||
label: 'All', | ||
context: { | ||
variant: 'all', | ||
href: '#', | ||
label: 'all link', | ||
}, | ||
}, | ||
{ | ||
name: 'more', | ||
label: 'More', | ||
context: { | ||
variant: 'more', | ||
href: '#', | ||
label: 'more link', | ||
}, | ||
}, | ||
], | ||
}; |
@@ -5,6 +5,9 @@ { | ||
"license": "EUPL-1.1", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"description": "ECL Links", | ||
"main": "_links.scss", | ||
"style": "_links.scss", | ||
"dependencies": { | ||
"@ec-europa/ecl-base": "^0.7.0" | ||
}, | ||
"peerDependencies": { | ||
@@ -11,0 +14,0 @@ "@ec-europa/ecl-icons": "^0.1.0" |
# Links | ||
Different kind of links are available, depending on the context: | ||
- In-line links (**.ecl-link**): when links are inside paragraphs. | ||
- External links (**.ecl-link--external**): when links pointed outside the ec.europa.eu domain. | ||
- Stand-alone links (**.ecl-link--standalone**): When links are not part of a paragraph. These links are usually in a list. | ||
- Inverted links (**.ecl-link--inverted**): When links are shown on a dark background. | ||
- Expandable link (**.ecl-link--expand**): When information needs to hide or expand to show additional content. | ||
- 'View all' links (**.ecl-link--all**): When more items need to be displayed. This link is always placed at the bottom of a list of items. The 'view all' link leads to the full list. | ||
## Why and how to use this component | ||
When you need to direct users to a different page or to provide access to further information. | ||
### Link types | ||
- **in-line text link** | ||
- internal links | ||
- external links | ||
- **stand-alone link** | ||
- more link | ||
- expandable link | ||
- social media link | ||
## When to use this component | ||
- **in-line link**<br/> | ||
when links are inserted within paragraph text blocks<br/> | ||
**style**<br/> | ||
blue, underlined (displayed in white colour if the background colour is blue) | ||
- **internal link**<br/> | ||
when links point to URLs inside the ec.europa.eu domain<br/> | ||
**style** <br/> | ||
underlined link | ||
- **external link**<br/> | ||
when links point to URLs outside the ec.europa.eu domain<br/> | ||
**style**<br/> | ||
underlined link with an appended square w/ arrow pointing outward | ||
- **stand-alone link**<br/> | ||
when links are not inserted within paragraph text blocks<br/> | ||
**style**<br/> | ||
blue, no underline | ||
- **more link**<br/> | ||
used on the Listings component | ||
- **expandable link**<br/> | ||
used on the Expandable component | ||
- **social media link**<br/> | ||
used on the Social media - Follow. and Social media - Share. components | ||
## Do not use this component | ||
- for actions or important links to other pages - in this case, use buttons instead |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
5913
9
70
52
0
2
+ Added@ec-europa/ecl-base@^0.7.0
+ Added@ec-europa/ecl-base@0.7.1(transitive)