<div class="rh-block-icon-link rh-block-icon-link--warning rh-element--clickable rh-w--fit-content" tabindex="0">
<a href="#" class="rh-element--clickable-link" title="" tabindex="-1"></a>
<div class="rh-button-circle rh-button-circle--warning rh-button-circle--large rh-block-icon-link__icon--warning" tabindex="-1">
<span class="icon-mic-off rh-button-circle__icon"></span>
</div>
<a href="#" class="rh-link--navigation rh-block-icon-link__link--warning ml1" tabindex="-1">Block - Icon with Link</a>
</div>
<div class="rh-block-icon-link rh-block-icon-link--{{modifier}} rh-element--clickable rh-w--fit-content" tabindex="0">
<a href="#" class="rh-element--clickable-link" title="" tabindex="-1"></a>
{{ render '@button-circle--default' iconData merge=true }}
<a href="#" class="rh-link--navigation rh-block-icon-link__link--{{modifier}} ml1" tabindex="-1">Block - Icon with Link</a>
</div>
{
"name": "default",
"modifier": "warning",
"iconData": {
"className": "rh-button-circle",
"modifier": "large",
"icon": "icon-mic-off",
"extendClass": "rh-block-icon-link__icon--warning",
"isUnderLarge": false,
"tabIndex": -1,
"priority": "warning"
}
}
.rh-block-icon-link {
display: flex;
align-items: center;
&--default {
// Base settings are using for making new classes during generation
$blockIconLinkClassname: "rh-block-icon-link--default";
$blockIconLinkIconClassname: "rh-block-icon-link__icon--default";
$blockIconLinkLinkClassname: "rh-block-icon-link__link--default";
// Generation
@include create-clickable-element-effect(
$blockIconLinkClassname, //Container's name for block-icon-link
$blockIconLinkLinkClassname, //Link's classname
false, //description classname
false, //outside - Only true or false
true, //inside - Only true or false
false, //border-top styling
false, //border-right styling
false, //border-bottom styling
false, //border-left styling
false, //box-shadow when :hover, :active
false, //box-shadow when :focus-within (Using for <div> tag)
false,//title color
underline, //title text-decoration
false, //description color
false //description text-decoration
) {
// Extend effects for only icon
@include create-icon-button-effect(
$blockIconLinkClassname, //Container's name for block-icon-link
$blockIconLinkIconClassname, //icon's classname
$BLOCKICONLINK__ICON--DEFAULT-HIGHLIGHT-BACKGROUND-COLOR, //icon's background
$BLOCKICONLINK__ICON--DEFAULT-HIGHLIGHT-COLOR //icon's color
)
}
}
&--secondary {
// Base settings are using for making new classes during generation
$blockIconLinkClassname: "rh-block-icon-link--secondary";
$blockIconLinkIconClassname: "rh-block-icon-link__icon--secondary";
$blockIconLinkLinkClassname: "rh-block-icon-link__link--secondary";
// Generation
@include create-clickable-element-effect(
$blockIconLinkClassname, //Container's name for block-icon-link
$blockIconLinkLinkClassname, //Link's classname
false, //description classname
false, //outside - Only true or false
true, //inside - Only true or false
false, //border-top styling
false, //border-right styling
false, //border-bottom styling
false, //border-left styling
false, //box-shadow when :hover, :active
false, //box-shadow when :focus-within (Using for <div> tag)
false,//title color
underline, //title text-decoration
false, //description color
false //description text-decoration
) {
// Extend effects for only icon
@include create-icon-button-effect(
$blockIconLinkClassname, //Container's name for block-icon-link
$blockIconLinkIconClassname, //icon's classname
$BLOCKICONLINK__ICON--SECONDARY-HIGHLIGHT-BACKGROUND-COLOR, //icon's background
$BLOCKICONLINK__ICON--SECONDARY-HIGHLIGHT-COLOR //icon's color
)
}
}
&--warning {
// Base settings are using for making new classes during generation
$blockIconLinkClassname: "rh-block-icon-link--warning";
$blockIconLinkIconClassname: "rh-block-icon-link__icon--warning";
$blockIconLinkLinkClassname: "rh-block-icon-link__link--warning";
// Generation
@include create-clickable-element-effect(
$blockIconLinkClassname, //Container's name for block-icon-link
$blockIconLinkLinkClassname, //Link's classname
false, //description classname
false, //outside - Only true or false
true, //inside - Only true or false
false, //border-top styling
false, //border-right styling
false, //border-bottom styling
false, //border-left styling
false, //box-shadow when :hover, :active
false, //box-shadow when :focus-within (Using for <div> tag)
false,//title color
underline, //title text-decoration
false, //description color
false //description text-decoration
) {
// Extend effects for only icon
@include create-icon-button-effect(
$blockIconLinkClassname, //Container's name for block-icon-link
$blockIconLinkIconClassname, //icon's classname
$BLOCKICONLINK__ICON--WARNING-HIGHLIGHT-BACKGROUND-COLOR, //icon's background
$BLOCKICONLINK__ICON--WARNING-HIGHLIGHT-COLOR //icon's color
)
}
}
}
/// Molecule - Block - Icon Link
$BLOCKICONLINK__ICON--DEFAULT-HIGHLIGHT-BACKGROUND-COLOR: $base3-light; // false
$BLOCKICONLINK__ICON--DEFAULT-HIGHLIGHT-COLOR: $black; //false
$BLOCKICONLINK__ICON--SECONDARY-HIGHLIGHT-BACKGROUND-COLOR: $base3; // false
$BLOCKICONLINK__ICON--SECONDARY-HIGHLIGHT-COLOR: $white; //false
$BLOCKICONLINK__ICON--WARNING-HIGHLIGHT-BACKGROUND-COLOR: $warning; // false
$BLOCKICONLINK__ICON--WARNING-HIGHLIGHT-COLOR: false; //false
{
"name": "regionhalland/block-icon-link",
"description": "A block with icon and link",
"type": "styleguide-molecule",
"license": "GPL-3.0",
"authors": [
{
"name": "Region Halland",
"email": "webbplatser@regionhalland.se"
}
],
"require": {}
}
rh-block-icon-link*
/components/Molecules/block-icon-link
Namn | Beskrivning |
---|---|
--default |
|
--secondary |
|
--warning |
Används för viktig eller varning information |
<div class="rh-block-icon-link rh-block-icon-link--default rh-element--clickable rh-w--fit-content" tabindex="0">
<a href="#" class="rh-element--clickable-link" title="" tabindex="-1"></a>
<span class="rh-circle-button rh-circle-button--default rh-circle-button--small rh-block-icon-link__icon--default mr1">
<span class="icon-corner-left-up"></span>
</span>
<a href="#" class="rh-link--navigation rh-block-icon-link__link--default" tabindex="-1">Länk till annan webb plats</a>
</div>
tabindex
--primary
har bytts namn till --secondary
för att det får konsekvensen från komponenten Atoms/button-circle.render
funktion används..settings.scss
har bytts för användning av global variabler.