Table of Contents

Class FooterLink

Namespace
TwBlazor.Models
Assembly
TwBlazor.dll

A link in a TwFooter, either in one of its sections or along its bottom row.

public sealed record FooterLink : IEquatable<FooterLink>
Inheritance
FooterLink
Implements
Inherited Members

Constructors

A link in a TwFooter, either in one of its sections or along its bottom row.

public FooterLink(string Label, string Href, Icon? Icon = null, bool OpensInNewTab = false)

Parameters

Label string

The text of the link.

Href string

The address the link goes to.

Icon Icon?

An optional icon shown before the label. It is decorative: the label names the link.

OpensInNewTab bool

Whether the link opens in a new tab. When it does, the link says so to assistive technology and is given rel="noopener noreferrer".

Properties

The address the link goes to.

public string Href { get; init; }

Property Value

string

An optional icon shown before the label. It is decorative: the label names the link.

public Icon? Icon { get; init; }

Property Value

Icon?

The text of the link.

public string Label { get; init; }

Property Value

string

Whether the link opens in a new tab. When it does, the link says so to assistive technology and is given rel="noopener noreferrer".

public bool OpensInNewTab { get; init; }

Property Value

bool

Methods

public void Deconstruct(out string Label, out string Href, out Icon? Icon, out bool OpensInNewTab)

Parameters

Label string
Href string
Icon Icon?
OpensInNewTab bool
public override bool Equals(object? obj)

Parameters

obj object

Returns

bool
public bool Equals(FooterLink? other)

Parameters

other FooterLink

Returns

bool
public override int GetHashCode()

Returns

int
public override string ToString()

Returns

string

Operators

public static bool operator ==(FooterLink? left, FooterLink? right)

Parameters

left FooterLink
right FooterLink

Returns

bool

Creates a link from a label and an address, so a list of links can be written as pairs.

public static implicit operator FooterLink((string Label, string Href) link)

Parameters

link (string Label, string Href)

The label and the address.

Returns

FooterLink
public static bool operator !=(FooterLink? left, FooterLink? right)

Parameters

left FooterLink
right FooterLink

Returns

bool