Skip to content

Commit

Permalink
feat(mobile): new icons (#14963)
Browse files Browse the repository at this point in the history
* feat(mobile): new mobile icons package + icon font

* chore: replace deprecated icons in mobile app

* fix: fix broken icons and add README
  • Loading branch information
Nodonisko authored Oct 22, 2024
1 parent f08deff commit b3924ee
Show file tree
Hide file tree
Showing 270 changed files with 1,526 additions and 894 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/components/Icon/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { IconName, icons } from '@suite-common/icons';
import {
icons as iconsDeprecated,
IconName as IconNameDeprecated,
} from '@suite-common/icons-deprecated/src/webComponents';
} from '@suite-common/icons-deprecated';
import { getFramePropsStory } from '../../utils/frameProps';

const meta: Meta = {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styled, { css, DefaultTheme } from 'styled-components';
import {
icons as iconsDeprecated,
IconName as IconNameDeprecated,
} from '@suite-common/icons-deprecated/src/webComponents';
} from '@suite-common/icons-deprecated';
import { icons, IconName as IconNameNew } from '@suite-common/icons';
import { CSSColor, Color } from '@trezor/theme';

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/Icon/icons.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { icons, IconName } from '@suite-common/icons';
import {
icons as iconsDeprecated,
IconName as IconNameDeprecated,
} from '@suite-common/icons-deprecated/src/webComponents';
} from '@suite-common/icons-deprecated';

const CopiedText = styled.div`
display: flex;
Expand Down
3 changes: 2 additions & 1 deletion scripts/list-outdated-dependencies/mobile-dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@ metro
metro-react-native-babel-preset
jest-expo
intl-pluralrules
@gorhom/bottom-sheet
@gorhom/bottom-sheet
fantasticon
23 changes: 3 additions & 20 deletions suite-common/icons-deprecated/assets/cryptoIcons/op.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions suite-common/icons-deprecated/assets/flags/cz.svg

This file was deleted.

5 changes: 0 additions & 5 deletions suite-common/icons-deprecated/generateIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ const assetTypesConfig = [
dirname: 'assets/cryptoIcons',
typeName: 'CryptoIconName',
},
{
name: 'flagIcons',
dirname: 'assets/flags',
typeName: 'FlagIconName',
},
];

// https://github.com/svg/svgo#built-in-plugins
Expand Down
12 changes: 1 addition & 11 deletions suite-common/icons-deprecated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,7 @@
"download-crypto-icons": "yarn g:tsx ./scripts/downloadCryptoIcons.ts"
},
"dependencies": {
"@shopify/react-native-skia": "1.3.11",
"@suite-common/wallet-config": "workspace:*",
"@suite-common/wallet-types": "workspace:*",
"@trezor/connect": "workspace:*",
"@trezor/styles": "workspace:*",
"@trezor/theme": "workspace:*",
"react": "18.2.0",
"react-native": "0.75.2",
"react-native-reanimated": "3.15.0",
"sharp": "0.32.6",
"styled-components": "^6.1.8"
"sharp": "0.32.6"
},
"devDependencies": {
"prettier": "^3.3.2",
Expand Down
30 changes: 0 additions & 30 deletions suite-common/icons-deprecated/src/components/CryptoIcon.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions suite-common/icons-deprecated/src/components/FlagIcon.tsx

This file was deleted.

82 changes: 0 additions & 82 deletions suite-common/icons-deprecated/src/components/Icon.tsx

This file was deleted.

52 changes: 0 additions & 52 deletions suite-common/icons-deprecated/src/config.ts

This file was deleted.

9 changes: 2 additions & 7 deletions suite-common/icons-deprecated/src/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ export const cryptoIcons = {
dsol: require('../assets/cryptoIcons/dsol.svg'),
etc: require('../assets/cryptoIcons/etc.svg'),
eth: require('../assets/cryptoIcons/eth.svg'),
op: require('../assets/cryptoIcons/op.svg'),
gnt: require('../assets/cryptoIcons/gnt.svg'),
ltc: require('../assets/cryptoIcons/ltc.svg'),
pol: require('../assets/cryptoIcons/pol.svg'),
name: require('../assets/cryptoIcons/name.svg'),
nmc: require('../assets/cryptoIcons/nmc.svg'),
op: require('../assets/cryptoIcons/op.svg'),
pol: require('../assets/cryptoIcons/pol.svg'),
regtest: require('../assets/cryptoIcons/regtest.svg'),
sol: require('../assets/cryptoIcons/sol.svg'),
tada: require('../assets/cryptoIcons/tada.svg'),
Expand All @@ -256,8 +256,3 @@ export const cryptoIcons = {
zec: require('../assets/cryptoIcons/zec.svg'),
} as const;
export type CryptoIconName = keyof typeof cryptoIcons;

export const flagIcons = {
cz: require('../assets/flags/cz.svg'),
} as const;
export type FlagIconName = keyof typeof flagIcons;
7 changes: 0 additions & 7 deletions suite-common/icons-deprecated/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
export * from './icons';
export * from './tokenIcons';
export * from './components/CryptoIcon';
export * from './components/CryptoIconWithPercentage';
export * from './components/DeviceModelIcon';
export * from './components/FlagIcon';
export * from './components/Icon';
export * from './utils';
export * from './config';

This file was deleted.

21 changes: 0 additions & 21 deletions suite-common/icons-deprecated/src/useRerenderOnAppState.ts

This file was deleted.

8 changes: 0 additions & 8 deletions suite-common/icons-deprecated/src/utils.ts

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions suite-common/icons-deprecated/src/webComponents/index.ts

This file was deleted.

7 changes: 0 additions & 7 deletions suite-common/icons-deprecated/styled.d.ts

This file was deleted.

8 changes: 1 addition & 7 deletions suite-common/icons-deprecated/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": { "outDir": "libDev" },
"references": [
{ "path": "../wallet-config" },
{ "path": "../wallet-types" },
{ "path": "../../packages/connect" },
{ "path": "../../packages/styles" },
{ "path": "../../packages/theme" }
]
"references": []
}
Loading

0 comments on commit b3924ee

Please sign in to comment.