Skip to content

Commit 3498124

Browse files
committed
feat: add icons
1 parent 0b75c16 commit 3498124

File tree

168 files changed

+2629
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+2629
-73
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
!.storybook
22
dist/**
33
storybook-static/**
4+
src/icons/**

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dist
22
node_modules
33
.yarn
4+
src/icons/**

.storybook/main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const path = require('path');
2+
13
const { VanillaExtractPlugin } = require('@vanilla-extract/webpack-plugin');
24

35
module.exports = {
@@ -59,6 +61,11 @@ module.exports = {
5961
});
6062

6163
config.resolve.extensions.push('.svg');
64+
config.resolve.alias = {
65+
...config.resolve.alias,
66+
// '@icons/$': resolve.resolve(__dirname, '../src/icons/'),
67+
'@icons': path.resolve(__dirname, '../src/icons/'),
68+
};
6269

6370
return config;
6471
},

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"module": "dist/index.esm.js",
1717
"typings": "dist/index.d.ts",
1818
"scripts": {
19-
"build": "rollup -c rollup.config.js",
19+
"build": "yarn build:icons && rollup -c rollup.config.js",
20+
"build:icons": "svgr ./src/icons/raw --out-dir ./src/icons --typescript",
2021
"build-storybook": "NODE_OPTIONS=--openssl-legacy-provider; build-storybook",
2122
"cleanup": "yarn exec rm -rf dist node_modules",
2223
"format": "yarn prettier --write .",
@@ -31,7 +32,6 @@
3132
"watch": "yarn build --watch"
3233
},
3334
"dependencies": {
34-
"@lace/icons": "file:.yalc/@lace/icons",
3535
"@radix-ui/react-alert-dialog": "^1.0.4",
3636
"@radix-ui/react-avatar": "^1.0.2",
3737
"@radix-ui/react-checkbox": "^1.0.4",
@@ -62,6 +62,7 @@
6262
"recharts": "^2.6.2"
6363
},
6464
"devDependencies": {
65+
"@babel/cli": "^7.22.10",
6566
"@babel/core": "^7.21.0",
6667
"@rollup/plugin-commonjs": "20.0.0",
6768
"@rollup/plugin-image": "2.1.1",
@@ -77,6 +78,7 @@
7778
"@storybook/react": "^6.5.16",
7879
"@storybook/test-runner": "^0.10.0",
7980
"@storybook/testing-library": "^0.0.13",
81+
"@svgr/cli": "^8.1.0",
8082
"@svgr/rollup": "^6.1.2",
8183
"@svgr/webpack": "^6.5.1",
8284
"@types/react": "^18.3.3",

src/design-system/action-card/action-card.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as RefreshIcon } from '@lace/icons/dist/RefreshComponent';
3+
import RefreshIcon from '@icons/RefreshComponent';
44
import type { Meta } from '@storybook/react';
55

66
import { Box } from '../box';

src/design-system/asset-input/ticker-button.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as ChevronRight } from '@lace/icons/dist/ChevronRightComponent';
3+
import ChevronRight from '@icons/ChevronRightComponent';
44

55
import { Text } from '../text';
66

src/design-system/auto-suggest-box/auto-suggest-box-close-button.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as CloseIcon } from '@lace/icons/dist/CloseComponent';
3+
import CloseIcon from '@icons/CloseComponent';
44

55
import * as cx from './auto-suggest-box-button.css';
66

src/design-system/auto-suggest-box/auto-suggest-box-icon.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

3-
import { ReactComponent as CheckIcon } from '@lace/icons/dist/CheckFileUploadComponent';
4-
import { ReactComponent as LoadingIcon } from '@lace/icons/dist/LoadingComponent';
3+
import CheckIcon from '@icons/CheckFileUploadComponent';
4+
import LoadingIcon from '@icons/LoadingComponent';
55
import cn from 'classnames';
66

77
import { Box } from '../box';

src/design-system/auto-suggest-box/auto-suggest-box-open-button.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { ReactComponent as BookIcon } from '@lace/icons/dist/BookComponent';
3+
import BookIcon from '@icons/BookComponent';
44

55
import * as cx from './auto-suggest-box-button.css';
66

src/design-system/bundle-input/bundle-input.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Fragment } from 'react';
22
import type { PropsWithChildren } from 'react';
33

4-
import { ReactComponent as PlusSmall } from '@lace/icons/dist/PlusSmallComponent';
4+
import PlusSmall from '@icons/PlusSmallComponent';
55

66
import { AssetInput } from '../asset-input';
77
import { Box } from '../box';

0 commit comments

Comments
 (0)