ئەم وەرگێڕانە بە یارمەتیی AI نووسراوە و پێویستی بە پێداچوونەوەی کەسێکی زمانزان هەیە.
@0xdolan/deq-elements
ئەم ناوەڕۆکە هێشتا بە زمانەکەت بەردەست نییە.
The <deq-icon> custom element for any page or framework.
<script type="module"> import "@0xdolan/deq-elements/define";</script><deq-icon name="roj-half-sun" size="32" stroke-width="1.5"></deq-icon>Source: packages/elements. Install with npm install @0xdolan/deq-elements.
Functions
defineDeqElements
function defineDeqElements(tag?: string): voidRegister <deq-icon> (or another tag name). Safe to call more than once and on servers,
where it does nothing.
drawIcon
function drawIcon(doc: Document, icon: DeqIcon, options?: IconOptions): SVGSVGElementBuild the <svg> element for icon with DOM calls (no HTML parsing).
Classes
DeqIconElement
class DeqIconElement<deq-icon name="roj-half-sun">: draws a Deq icon inline (light DOM, so CSS color
and selectors work). Attributes: name, size, color, stroke-width,
absolute-stroke-width and label (the accessible title; label="" marks the icon
decorative). Set the icon property to draw custom icon data instead of name.
#icon: DeqIcon | undefinedicon: DeqIcon | undefined: Custom icon data; takes precedence over thenameattribute.connectedCallback: () => voidattributeChangedCallback: () => voidoptions: () => IconOptions: The icon options from the attributes.update: () => void: Redraw the icon now. Lifecycle callbacks redraw automatically and leave the element empty for an unknown name or invalid attributes; this method throws instead.#draw: () => void
Constants
packageName
const packageName: '@0xdolan/deq-elements'The npm package name.
وەشانێکی نوێی ئەم ماڵپەڕە بەردەستە.