class Beartropy

Beartropy UI Core Class.

Handles core functionality for the UI package, primarily icon parsing.

Methods

string|null
parseIcon(string|null $icon, string $class = 'w-5 h-5', string|null $set = null)

Parse and render an icon relative to the UI context.

Details

at line 26
string|null parseIcon(string|null $icon, string $class = 'w-5 h-5', string|null $set = null)

Parse and render an icon relative to the UI context.

This method delegates to the global helper beartropy_parse_icon. It handles various icon formats including Emojis, raw SVG strings, and Blade components.

Parameters

string|null $icon

The icon name, emoji, or SVG string.

string $class

CSS classes to apply to the icon.

string|null $set

The icon set to use (if applicable).

Return Value

string|null

The rendered HTML/SVG string or null if no icon is provided.