Home / Function/ getIconHTML() — astro Function Reference

getIconHTML() — astro Function Reference

Architecture documentation for the getIconHTML() function in icon.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  f8c9ee63_1ae1_0bbe_1c73_266a00b0bc18["getIconHTML()"]
  d6c9a997_c573_d283_b6d1_6365995e2a3b["DevToolbarIcon"]
  f8c9ee63_1ae1_0bbe_1c73_266a00b0bc18 -->|defined in| d6c9a997_c573_d283_b6d1_6365995e2a3b
  254d8849_519e_5224_59bc_121fbc545bd4["buildTemplate()"]
  254d8849_519e_5224_59bc_121fbc545bd4 -->|calls| f8c9ee63_1ae1_0bbe_1c73_266a00b0bc18
  style f8c9ee63_1ae1_0bbe_1c73_266a00b0bc18 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/client/dev-toolbar/ui-library/icon.ts lines 27–34

	getIconHTML(icon: Icon | undefined) {
		if (icon && isDefinedIcon(icon)) {
			return getIconElement(icon)?.outerHTML ?? '';
		}

		// If the icon that was passed isn't one of the predefined one, assume that they're passing it in as a slot
		return '<slot />';
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getIconHTML() do?
getIconHTML() is a function in the astro codebase, defined in packages/astro/src/runtime/client/dev-toolbar/ui-library/icon.ts.
Where is getIconHTML() defined?
getIconHTML() is defined in packages/astro/src/runtime/client/dev-toolbar/ui-library/icon.ts at line 27.
What calls getIconHTML()?
getIconHTML() is called by 1 function(s): buildTemplate.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free