diff --git a/README.md b/README.md index ec3e131a..2ecdb99e 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,8 @@ Icon components accept all props that you can pass to a normal SVG element, incl - **size?**: `number | string` – Icon height & width. As with standard React elements, this can be a number, or a string with units in `px`, `%`, `em`, `rem`, `pt`, `cm`, `mm`, `in`. - **weight?**: `"thin" | "light" | "regular" | "bold" | "fill" | "duotone"` – Icon weight/style. Can also be used, for example, to "toggle" an icon's state: a rating component could use Stars with `weight="regular"` to denote an empty star, and `weight="fill"` to denote a filled star. - **mirrored?**: `boolean` – Flip the icon horizontally. Can be useful in RTL languages where normal icon orientation is not appropriate. +- **title?**: `string` – Accessibility label +- **titleId?**: `string` – Accessibility label ID ### Context diff --git a/generator/generate-svg.mjs b/generator/generate-svg.mjs index 8d8d03c8..26d85abf 100644 --- a/generator/generate-svg.mjs +++ b/generator/generate-svg.mjs @@ -67,8 +67,8 @@ const generateIconWithWeight = (icon, weight) => { }).then((tsCode) => { tsCode = tsCode .replace(/import type .*;\n/g, '') - .replace('const', "import { IconProps } from '../lib'\n\nconst") - .replace('props: SvgProps', 'props: IconProps') + .replace('const', "import type { IconProps } from '../lib'\n\nconst") + .replace('SvgProps', 'IconProps') .replace(' xmlns="http://www.w3.org/2000/svg"', '') .replace( ' { const componentFileName = fileNameMap[component] || component; const componentName = componentNameMap[component] || component; const componentCode = `import React, { useContext, useMemo } from 'react' -import { IconProps, IconContext } from '../lib' +import { type IconProps, IconContext } from '../lib' import bold from '../bold/${componentFileName}' import duotone from '../duotone/${componentFileName}' diff --git a/package.json b/package.json index b5bdf1e9..ebee1114 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phosphor-react-native", - "version": "2.1.1", + "version": "2.1.2", "description": "Flexible icons for React Native", "main": "lib/commonjs/index.js", "module": "lib/module/index.js", @@ -144,4 +144,4 @@ ] ] } -} \ No newline at end of file +}