Skip to content

Commit

Permalink
fix: 更新 @asany/icons 到 0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
limaofeng committed Aug 2, 2021
1 parent 04c2c17 commit 5c9ce73
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}
],
"dependencies": {
"@asany/icons": "^0.1.3",
"@asany/icons": "^0.1.5",
"@asany/library-manager": "^0.1.4",
"@daybrush/drag": "^0.19.3",
"@scena/react-guides": "^0.16.0",
Expand Down
16 changes: 8 additions & 8 deletions stories/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import DemoPlugin from './editors/demo';
import { useEffect } from 'react';
import { useState } from 'react';
import { IconLibrary } from '@asany/icons/dist/store/IconDatabase';
import { useCallback } from 'react';

const meta: Meta = {
title: '编辑器/图标',
Expand All @@ -31,10 +32,13 @@ const Template: Story<any> = (_args) => {
DemoPlugin.scena.workspace = () => {
const store = useStore();
const [lib, setLib] = useState<IconLibrary | undefined>();
const loadLocalLibrary = useCallback(async () => {
const lib = await store.local();
setLib(lib);
}, []);
useEffect(() => {
store.local().then((lib) => {
setLib(lib);
});
loadLocalLibrary();
return store.onChange(loadLocalLibrary);
}, []);

if (!lib) {
Expand Down Expand Up @@ -67,11 +71,7 @@ const Template: Story<any> = (_args) => {
onSave={(data) => console.log(data)}
project={{
id: 'test',
name: (
<div style={{ color: '#727d83', fontSize: 16 }}>
项目名称展示区域
</div>
) as any,
name: (<div style={{ color: '#727d83', fontSize: 16 }}>项目名称展示区域</div>) as any,
type: 'demo',
data: {
id: '111',
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
tslib "^2.3.0"
zen-observable-ts "^1.1.0"

"@asany/icons@^0.1.3":
version "0.1.3"
resolved "https://registry.npmjs.org/@asany/icons/-/icons-0.1.3.tgz#5b8432703cb6b6a3062cdb187361271df909cdd0"
integrity sha512-cEdFd3f5fY2UwwggcrBhcHFj7MgUrw3EA1mftzsGKFi9odtt2E3syVI4shgw4n144/3q1z/BjIvZeW74ykGuxA==
"@asany/icons@^0.1.5":
version "0.1.5"
resolved "https://registry.npmjs.org/@asany/icons/-/icons-0.1.5.tgz#51291379d3037584f78239cb5ea29b63b18e82c9"
integrity sha512-9Quf26ygOsJw4ZOrTZoNCbk3JLmqv0euJmTCUMRKJEK0nC/CTQPkcho6pkAL/E36SBH6cZusSMX4xojgdtpVOQ==
dependencies:
"@apollo/client" "^3.3.20"
classnames "^2.3.1"
Expand Down

0 comments on commit 5c9ce73

Please sign in to comment.