Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rui/refactor icons #6

Merged
merged 3 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/eight-houses-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@just_testing13/components": patch
"@just_testing13/coin-icons": patch
---

Rui/refactor icons
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
},
"scripts": {
"dev": "storybook dev -p 6006",
"lint": "eslint packages/**/src --ext .ts,.tsx --config .eslintrc.json --cache",
"lint": "eslint packages/**/src packages/**/**/src --ext .ts,.tsx --config .eslintrc.json --cache",
"lint:fix": "pnpm lint --fix",
"typecheck": "turbo typecheck",
"format:check": "prettier --check packages/**/src --cache",
"format:write": "prettier --write packages/**/src --cache",
"format:check": "prettier --check packages/**/src packages/**/**/src --cache",
"format:write": "prettier --write packages/**/src packages/**/**/src --cache",
"clean": "turbo run clean && rm -rf node_modules",
"build": "turbo run build",
"build:sb": "storybook build",
Expand Down
1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"dependencies": {
"@just_testing13/hooks": "workspace:*",
"@just_testing13/icons": "workspace:*",
"@just_testing13/coin-icons": "workspace:*",
"@just_testing13/theme": "workspace:*",
"@react-aria/accordion": "3.0.0-alpha.20",
"@react-aria/breadcrumbs": "^3.5.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/CoinIcon/CoinIcon.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, StoryFn, StoryObj } from '@storybook/react';
import * as coins from '@just_testing13/icons/src/svg/coin';
import * as coins from '@just_testing13/coin-icons';

import { Flex } from '../Flex';

Expand Down
5 changes: 2 additions & 3 deletions packages/components/src/CoinIcon/CoinIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { forwardRef } from 'react';
import { IconProps } from '@just_testing13/icons';

import * as coins from '../../../icons/src/svg/coin';
import { IconProps } from '@just_testing13/coin-icons';
import * as coins from '@just_testing13/coin-icons';

import { FallbackIcon } from './FallbackIcon';
import { LPCoinIcon } from './LPCoinIcon';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/TokenInput/TokenInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, StoryObj } from '@storybook/react';
import * as coins from '@just_testing13/icons/src/svg/coin';
import * as coins from '@just_testing13/coin-icons';
import { useState } from 'react';
import { mergeProps } from '@react-aria/utils';

Expand Down
62 changes: 0 additions & 62 deletions packages/icons/CHANGELOG.md

This file was deleted.

30 changes: 30 additions & 0 deletions packages/icons/coin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "@just_testing13/coin-icons",
"version": "0.0.0",
"main": "src/index.ts",
"files": [
"dist"
],
"license": "MIT",
"sideEffects": false,
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --ext ts,tsx --fix",
"build": "tsup src/index.ts --dts",
"prepack": "clean-package",
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
},
"devDependencies": {
"clean-package": "^2.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"dependencies": {
"@just_testing13/icon": "workspace:*"
},
"clean-package": "../../../clean-package.config.json"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const BTC = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const ETH = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const USDT = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'>
Expand Down
4 changes: 4 additions & 0 deletions packages/icons/coin/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './common';
export * from './polkadot';
export { Icon } from '@just_testing13/icon';
export type { IconProps, IconSize } from '@just_testing13/icon';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const AUSD = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const DOT = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 45 45' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const IBTC = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const INTR = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const KAR = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const KBTC = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const KINT = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const KSM = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const LDOT = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const LKSM = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const LSKSM = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const MOVR = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const SKSM = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const VKSM = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const qDOT = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const qIBTC = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const qINTR = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const qKBTC = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const qKINT = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const qKSM = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const qMOVR = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '../../../Icon';
import { Icon, IconProps } from '@just_testing13/icon';

const qUSDT = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} fill='none' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, StoryObj } from '@storybook/react';
import { Icon, IconProps } from '@just_testing13/icon';

import * as SVGS from '../svg/coin';
import { Icon, IconProps } from '../Icon';
import * as SVGS from '../';

export const Default: StoryObj<IconProps> = {
args: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
"compilerOptions": { "baseUrl": ".", "declaration": false },
"include": ["src"]
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18",
"styled-components": ">=6.0.0"
"react-dom": ">=18"
},
"devDependencies": {
"@types/styled-components": "^5.1.26",
"clean-package": "^2.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"styled-components": "^6.0.7"
"react-dom": "^18.2.0"
},
"dependencies": {
"@just_testing13/theme": "workspace:*"
"@just_testing13/icon": "workspace:*"
},
"clean-package": "../../clean-package.config.json"
"clean-package": "../../../clean-package.config.json"
}
Loading