Skip to content

Commit

Permalink
refactor: add jsdoc for monicon props
Browse files Browse the repository at this point in the history
  • Loading branch information
oktaysenkan committed Jan 7, 2025
1 parent 441c9a3 commit 5fa1612
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,29 @@ declare module "@monicon/icon-loader" {
export type MoniconIconName = ${iconNamesAsCode};
export type MoniconProps = {
/**
* The name of the icon to render.
*
* @example "mdi:home"
*
* For TypeScript users, you must check https://monicon-docs.vercel.app/troubleshooting/typescript for more information.
*/
name: MoniconIconName;
/**
* The size of the icon.
*
* @default icon collection size
*/
size?: number;
/**
* The color of the icon.
*
* @default "currentColor"
*/
color?: string;
/**
* The stroke width of the icon. This feature is only available for limited icon collections.
*/
strokeWidth?: number;
};
}
Expand Down
20 changes: 20 additions & 0 deletions packages/icon-loader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,29 @@ import { parseSync, stringify } from "svgson";
import icons from "@monicon/runtime";

export type MoniconProps = {
/**
* The name of the icon to render.
*
* @example "mdi:home"
*
* For TypeScript users, you must check https://monicon-docs.vercel.app/troubleshooting/typescript for more information.
*/
name: string;
/**
* The size of the icon.
*
* @default icon collection size
*/
size?: number;
/**
* The color of the icon.
*
* @default "currentColor"
*/
color?: string;
/**
* The stroke width of the icon. This feature is only available for limited icon collections.
*/
strokeWidth?: number;
};

Expand Down

0 comments on commit 5fa1612

Please sign in to comment.