public class | source
import Badge from 'flarum/components/Badge'
Badge
Direct Subclass:
The
Badge component represents a user/discussion badge, indicating some
status (e.g. a discussion is stickied, a user is an admin).
A badge may have the following special props:
typeThe type of badge this is. This will be used to give the badge a class name of
Badge--{type}.
iconThe name of an icon to show inside the badge.
label
All other props will be assigned as attributes on the badge element.
Method Summary
Inherited Summary
Public Methods
public config(isInitialized: *) source
Called after the component's root element is redrawn. This hook can be used to perform any actions on the DOM, both on the initial draw and any subsequent redraws. See Mithril's documentation for more information.
Override:Component#config
Params:
public view(): * source
Get the virtual DOM that represents the component's view.