Biçe naverokê

Ev werger bi alîkariya AI hatiye amadekirin û divê axêverekî zikmakî lê binêre.

@0xdolan/deq-react

Ev naverok hêj bi zimanê te tune.

Deq shapes as typed, tree-shakable React components.

import { RojHalfSun, DeqIcon } from "@0xdolan/deq-react";
<RojHalfSun size={32} strokeWidth={1.5} absoluteStrokeWidth />
<DeqIcon name="kurdish-sun" color="#ED2024" />

Source: packages/react. Install with npm install @0xdolan/deq-react.

Per-shape exports

93 generated exports, one per shape, such as ArchDot, ArchDotColumn, ArrowDown. The icon list shows every shape.

Functions

DeqIcon

function DeqIcon({ name, ...props }: DeqIconByNameProps): ReactElement<unknown, string | JSXElementConstructor<any>>

Any icon by catalog id: <DeqIcon name="roj-half-sun" />. It keeps every icon in the bundle; import the named components (RojHalfSun) to tree-shake.

@throws {DeqError} UNKNOWN_SHAPE for an id that is not in the catalog.

createDeqIcon

function createDeqIcon(icon: DeqIcon, displayName: string): FunctionComponent<DeqIconProps>

Make a typed component from icon data (@0xdolan/deq-icons). The generated components use this; call it yourself for custom icon data.

Constants

packageName

const packageName: '@0xdolan/deq-react'

The npm package name.

Interfaces

DeqIconByNameProps

interface DeqIconByNameProps

Props of DeqIcon: an icon picked by catalog id.

  • name: string: Catalog id, for example roj-half-sun.
  • size?: string | number: Width and height in px, or any CSS length. Default 24.
  • color?: string: Stroke and dot colour (CSS colour). Default currentColor.
  • strokeWidth?: string | number: Stroke width in grid units. Default 2.
  • absoluteStrokeWidth?: boolean: Keep the stroke strokeWidth px wide at any numeric size. Default false.
  • title?: string: Accessible title. Default: the English name. "" marks the icon decorative.

DeqIconProps

interface DeqIconProps

Props of every Deq icon component; other SVG props pass through to the <svg>.

  • size?: string | number: Width and height in px, or any CSS length. Default 24.
  • color?: string: Stroke and dot colour (CSS colour). Default currentColor.
  • strokeWidth?: string | number: Stroke width in grid units. Default 2.
  • absoluteStrokeWidth?: boolean: Keep the stroke strokeWidth px wide at any numeric size. Default false.
  • title?: string: Accessible title. Default: the English name. "" marks the icon decorative.