Skip to content

Commit

Permalink
🚚 chore: ImageGallery 重命名为 AssetGallery
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jun 18, 2021
1 parent a4ebad9 commit dd352a6
Show file tree
Hide file tree
Showing 45 changed files with 135 additions and 164 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: ImageGallery 图片画廊
title: AssetGallery 资产画廊
order: 2
---

# ImageGallery 图片画廊
# AssetGallery 资产画廊

[![NPM version][version-image]][version-url] [![NPM downloads][download-image]][download-url]

[version-image]: http://img.shields.io/npm/v/@arvinxu/image-gallery.svg?color=deepgreen&label=latest
[version-url]: http://npmjs.org/package/@arvinxu/image-gallery
[download-image]: https://img.shields.io/npm/dm/@arvinxu/image-gallery.svg
[download-url]: https://github.com/arvinxx/components/tree/master/packages/image-gallery
[version-image]: http://img.shields.io/npm/v/@arvinxu/asset-gallery.svg?color=deepgreen&label=latest
[version-url]: http://npmjs.org/package/@arvinxu/asset-gallery
[download-image]: https://img.shields.io/npm/dm/@arvinxu/asset-gallery.svg
[download-url]: https://github.com/arvinxx/components/tree/master/packages/asset-gallery

资产中心组件之图片画廊
资产橱窗

[![Edit Design Assets Gallery](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/damp-haze-djpd7?fontsize=14&hidenavigation=1&theme=dark)

Expand All @@ -27,24 +27,24 @@ order: 2
### 使用 JSON

组件库的 Logo 物料
<code src='./examples/ImageGallery/Demo.tsx' />
<code src='./examples/AssetGallery/Demo.tsx' />

### 使用 YML

`v2.0.0` 开始支持使用 YAML 语法

<code src='./examples/ImageGallery/YAMLDemo.tsx' />
<code src='./examples/AssetGallery/YAMLDemo.tsx' />

### Png 图片

图片源为 Png

<code src='./examples/ImageGallery/PngDemo.tsx' />
<code src='./examples/AssetGallery/PngDemo.tsx' />

## Sketch 素材

复制 Sketch 文件, 使用 [sketch-json](https://github.com/arvinxx/sketch-json) 粘贴到 sketch 中

<code src='./examples/ImageGallery/SketchDemo.tsx' />
<code src='./examples/AssetGallery/SketchDemo.tsx' />

<API src='../../../packages/image-gallery/src/index.tsx'></API>
<API src='../../../packages/asset-gallery/src/index.tsx'></API>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* compact: true
*/
import React from 'react';
import ImageGallery from '@arvinxu/image-gallery';
import AssetGallery from '@arvinxu/asset-gallery';

import { images } from './data';

Expand All @@ -14,7 +14,7 @@ const Demo = () => {
padding: 24,
}}
>
<ImageGallery data={images} darkBackground={'black'} />
<AssetGallery data={images} darkBackground={'black'} />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* compact: true
*/
import React from 'react';
import ImageGallery from '@arvinxu/image-gallery';
import AssetGallery from '@arvinxu/asset-gallery';

import { yml } from './png';

Expand All @@ -14,7 +14,7 @@ const PngDemo = () => {
padding: 24,
}}
>
<ImageGallery data={yml} darkBackground={'black'} />
<AssetGallery data={yml} darkBackground={'black'} />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* compact: true
*/
import React from 'react';
import AssetGallery from '@arvinxu/image-gallery';
import AssetGallery from '@arvinxu/asset-gallery';

import { sketch } from './sketch';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* compact: true
*/
import React from 'react';
import ImageGallery from '@arvinxu/image-gallery';
import AssetGallery from '@arvinxu/asset-gallery';

import { yml } from './yml';

Expand All @@ -14,7 +14,7 @@ const YAMLDemo = () => {
padding: 24,
}}
>
<ImageGallery data={yml} darkBackground={'black'} />
<AssetGallery data={yml} darkBackground={'black'} />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AssetList } from '@arvinxu/image-gallery';
import { AssetList } from '@arvinxu/asset-gallery';

export const images: AssetList = [
{
Expand All @@ -9,18 +9,21 @@ export const images: AssetList = [
{
title: '黑色 Logo',
description: '亮色背景下使用',
url: 'https://gw.alipayobjects.com/zos/antfincdn/FEuGy%26pKf2/black-logo.svg',
url:
'https://gw.alipayobjects.com/zos/antfincdn/FEuGy%26pKf2/black-logo.svg',
},
{
title: '黑色方形 Logo',
description: '亮色背景下使用',
url: 'https://gw.alipayobjects.com/zos/antfincdn/iCZHoHFqZM/squre-black.svg',
url:
'https://gw.alipayobjects.com/zos/antfincdn/iCZHoHFqZM/squre-black.svg',
},
{
title: '白色方形 Logo',
description: '亮色背景下使用',
dark: true,
url: 'https://gw.alipayobjects.com/zos/antfincdn/9IE%24pNh%26d3/squre-white.svg',
url:
'https://gw.alipayobjects.com/zos/antfincdn/9IE%24pNh%26d3/squre-white.svg',
},
{
title: '白色 Logo',
Expand All @@ -35,7 +38,8 @@ export const images: AssetList = [
description: '暗色背景下使用',
dark: true,
darkBackground: '#1fadd3',
url: 'https://gw.alipayobjects.com/zos/antfincdn/3vXiuFe18O/black-white.svg',
url:
'https://gw.alipayobjects.com/zos/antfincdn/3vXiuFe18O/black-white.svg',
},
{
title: '黑色 Logo',
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ footer: Open-source MIT Licensed | Copyright © 2021-present
| 组件 | 版本 | 说明 |
| --------------------------------------------- | ------------------------------------------------------------------------ | -------------------------------------------------------- |
| [MindFlow](/components/biz/mindflow) | [![NPM version][mindflow-version-image]][mindflow-version-url] | 基于溯因推理与图尔敏推论模型为理论基础构建的思维推理组件 |
| [ImageGallery](/components/biz/image-gallery) | [![NPM version][image-gallery-version-image]][image-gallery-version-url] | 方便物料分发的图片画廊组件 |
| [AssetGallery](/components/biz/asset-gallery) | [![NPM version][asset-gallery-version-image]][asset-gallery-version-url] | 方便物料分发的图片画廊组件 |
| [JourneyMap](/components/biz/journey-map) | [![NPM version][journey-map-version-image]][journey-map-version-url] | 用户旅程地图组件 |

[mindflow-version-image]: http://img.shields.io/npm/v/@arvinxu/mindflow.svg?color=deepgreen&label=latest
[mindflow-version-url]: http://npmjs.org/package/@arvinxu/mindflow
[image-gallery-version-image]: http://img.shields.io/npm/v/@arvinxu/image-gallery.svg?color=deepgreen&label=latest
[image-gallery-version-url]: http://npmjs.org/package/@arvinxu/image-gallery
[asset-gallery-version-image]: http://img.shields.io/npm/v/@arvinxu/asset-gallery.svg?color=deepgreen&label=latest
[asset-gallery-version-url]: http://npmjs.org/package/@arvinxu/asset-gallery
[journey-map-version-image]: http://img.shields.io/npm/v/@arvinxu/journey-map.svg?color=deepgreen&label=latest
[journey-map-version-url]: http://npmjs.org/package/@arvinxu/journey-map
2 changes: 1 addition & 1 deletion jest.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
...defaultConfig,
setupFiles: [...defaultConfig.setupFiles],
moduleNameMapper: {
'@arvinxu/image-gallery': '<rootDir>/packages/image-gallery/src',
'@arvinxu/asset-gallery': '<rootDir>/packages/asset-gallery/src',
'@arvinxu/preloader': '<rootDir>/packages/preloader/src',
'@arvinxu/macos-traffic-light':
'<rootDir>/packages/macos-traffic-light/src',
Expand Down
File renamed without changes.
Loading

0 comments on commit dd352a6

Please sign in to comment.