From aaf213e23c4a67277700ccc5f80af5e9de4854b6 Mon Sep 17 00:00:00 2001 From: Ross Bulat Date: Sun, 3 Nov 2024 09:26:12 +0700 Subject: [PATCH] feat: add `fontSize` prop to `Polkicon`, div -> span (#141) --- library/react-polkicon/package.json | 2 +- library/react-polkicon/src/index.tsx | 9 ++++++--- library/react-polkicon/src/types.ts | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/library/react-polkicon/package.json b/library/react-polkicon/package.json index 144e233..603ee0d 100644 --- a/library/react-polkicon/package.json +++ b/library/react-polkicon/package.json @@ -1,7 +1,7 @@ { "name": "@w3ux/react-polkicon-source", "license": "GPL-3.0-only", - "version": "2.0.0", + "version": "2.0.1-alpha.0", "type": "module", "scripts": { "clear": "rm -rf node_modules dist tsconfig.tsbuildinfo", diff --git a/library/react-polkicon/src/index.tsx b/library/react-polkicon/src/index.tsx index f7ddbf2..b416c23 100644 --- a/library/react-polkicon/src/index.tsx +++ b/library/react-polkicon/src/index.tsx @@ -12,6 +12,7 @@ export const Polkicon = ({ background, inactive, transform: propTransform, + fontSize, }: PolkiconProps) => { // The colors of the Polkicon and inner circles. const [colors, setColors] = useState([]); @@ -55,13 +56,15 @@ export const Polkicon = ({ return ( coords && ( -
-
+ ) ); }; diff --git a/library/react-polkicon/src/types.ts b/library/react-polkicon/src/types.ts index 250ff42..27243ba 100644 --- a/library/react-polkicon/src/types.ts +++ b/library/react-polkicon/src/types.ts @@ -23,6 +23,7 @@ export interface PolkiconProps { background?: string; inactive?: boolean; transform?: TransformProp; + fontSize?: number | string; } export type TransformProp =