Skip to content

Commit 116ec42

Browse files
authored
Release 2.1.0: New icons, extendable props, fix import issue (#59)
* fix: upgrade deps (phosphor 2.1) * fix: upgrade deps (+ eslint v9) * fix: upgrade example deps * feat: init example and showcase * feat: add testID, fixes #32, fixes #50 * fix: unable to resolve imports for web fixes #58 * fix: cleanup * fix: circlecli node version * chore: release 2.1.1 * fix: cleanup bootstrap * fix: upgrade github ci * fix: fixes #47 add support for aria label * fix: fix build + update readme * fix: fix ci fail because src/index does not exist
1 parent 7151d89 commit 116ec42

File tree

20 files changed

+5314
-4632
lines changed

20 files changed

+5314
-4632
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
executors:
44
default:
55
docker:
6-
- image: circleci/node:10
6+
- image: circleci/node:22
77
working_directory: ~/project
88

99
commands:

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
name: CI
2-
on:
3-
push
2+
on: push
43

54
jobs:
65
run:
76
runs-on: ubuntu-latest
87
timeout-minutes: 360
98
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-node@v2
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-node@v4
11+
with:
12+
node-version: 18
1213

1314
- name: Get yarn cache directory path
1415
id: yarn-cache-dir-path
1516
run: echo "::set-output name=dir::$(yarn cache dir)"
1617

17-
- uses: actions/cache@v2
18+
- uses: actions/cache@v4
1819
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
1920
with:
2021
path: |

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ project.xcworkspace
3636
local.properties
3737
android.iml
3838

39-
# Cocoapods
40-
#
41-
example/ios/Pods
42-
4339
# node.js
4440
#
4541
node_modules/

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/src
22
lib/**/*.map
3+
/example

.yarnrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ yarn release
9292

9393
The `package.json` file contains various scripts for common tasks:
9494

95-
- `yarn bootstrap`: setup project by installing all dependencies and pods.
9695
- `yarn typescript`: type-check files with TypeScript.
9796
- `yarn lint`: lint files with ESLint.
9897
- `yarn test`: run unit tests with Jest.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Icon components accept all props that you can pass to a normal SVG element, incl
7272
- **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`.
7373
- **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.
7474
- **mirrored?**: `boolean` – Flip the icon horizontally. Can be useful in RTL languages where normal icon orientation is not appropriate.
75+
- **title?**: `string` – Accessibility label
76+
- **titleId?**: `string` – Accessibility label ID
7577

7678
### Context
7779

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line no-undef
12
module.exports = {
23
presets: ['module:metro-react-native-babel-preset'],
34
};

eslint.config.mjs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import globals from 'globals';
2+
import pluginJs from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
4+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
5+
6+
export default [
7+
{ files: ['**/*.{js,mjs,cjs,ts}'] },
8+
{ languageOptions: { globals: globals.browser } },
9+
pluginJs.configs.recommended,
10+
...tseslint.configs.recommended,
11+
{
12+
ignores: [
13+
'node_modules/',
14+
'lib/',
15+
'src/bold/',
16+
'src/duotone/',
17+
'src/fill/',
18+
'src/icons/',
19+
'src/light/',
20+
'src/regular/',
21+
'src/thin/',
22+
'src/index.tsx',
23+
'example/',
24+
],
25+
},
26+
eslintPluginPrettierRecommended,
27+
];

example/App.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* eslint-disable react-native/no-inline-styles */
2+
/* eslint-disable @typescript-eslint/no-explicit-any */
3+
24
import * as React from 'react';
35

46
import {
@@ -12,7 +14,7 @@ import {
1214
TouchableOpacity,
1315
} from 'react-native';
1416
import * as IconPack from 'phosphor-react-native';
15-
const PhosphorLogo = require('./phosphor-mark-tight-yellow.png');
17+
import PhosphorLogo from './phosphor-mark-tight-yellow.png';
1618

1719
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1820
const { IconContext, ...Icons } = IconPack;

0 commit comments

Comments
 (0)