Skip to content

Commit ba27cca

Browse files
authored
Merge eaf30ce into 9edb836
2 parents 9edb836 + eaf30ce commit ba27cca

File tree

8 files changed

+28
-27
lines changed

8 files changed

+28
-27
lines changed

.umirc.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import { defineConfig } from 'dumi';
22

33
const name = 'react-image-shadow';
4+
const shortName = 'ImageShadow';
5+
6+
const url = 'https://avatars1.githubusercontent.com/u/75532006?s=200&v=4';
47

58
export default defineConfig({
6-
title: 'Image Shadow',
7-
favicon:
8-
'https://github.com/image-component/react-image-shadow/blob/main/logo.png?raw=true',
9-
logo:
10-
'https://github.com/image-component/react-image-shadow/blob/main/logo.png?raw=true',
9+
title: shortName,
10+
favicon: url,
11+
logo: url,
1112
outputPath: 'docs-dist',
1213
exportStatic: {},
1314
base: `/${name}/`,
1415
publicPath: `/${name}/`,
15-
theme: {
16-
'@c-primary': '#3bacea',
17-
},
1816
hash: true,
1917
scripts: [
2018
{
@@ -23,7 +21,7 @@ export default defineConfig({
2321
var timer = setInterval(function() {
2422
try {
2523
var menuList = document.getElementsByClassName('__dumi-default-menu-list');
26-
menuList[0].childNodes[0].childNodes[0].innerText = '🌈 ${name}';
24+
menuList[0].childNodes[0].childNodes[0].innerText = '🌈 ${shortName}';
2725
clearInterval(timer);
2826
} catch (e) {}
2927
}, 200)

docs/example/base.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ import ImageShadow from 'react-image-shadow';
77
import './demo.less';
88
import '../../assets/index.less';
99

10+
const url1 =
11+
'https://github.com/image-component/gallery/blob/main/girl/5.jpg?raw=true';
12+
const url2 =
13+
'https://github.com/image-component/gallery/blob/main/girl/1.jpg?raw=true';
14+
const url3 =
15+
'https://github.com/image-component/gallery/blob/main/girl/2.jpg?raw=true';
16+
1017
const App = () => {
1118
return (
1219
<div className="base-demo">
13-
<ImageShadow src="https://github.com/image-tool/react-image-shadow/blob/main/image/red.png?raw=true"></ImageShadow>
14-
<ImageShadow src="https://github.com/image-tool/react-image-shadow/blob/main/image/blue.jpg?raw=true"></ImageShadow>
15-
<ImageShadow
16-
shadowRadius={20}
17-
src="https://github.com/image-tool/react-image-shadow/blob/main/image/white.jpg?raw=true"
18-
></ImageShadow>
20+
<ImageShadow src={url1}></ImageShadow>
21+
<ImageShadow src={url2}></ImageShadow>
22+
<ImageShadow shadowRadius={20} src={url3}></ImageShadow>
1923
</div>
2024
);
2125
};

docs/example/demo.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
padding: 0 50px;
33
display: grid;
44
justify-content: space-around;
5+
align-items: center;
56
grid-template-columns: repeat(auto-fill, 300px);
67
grid-gap: 40px;
78
}

docs/example/hover.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,19 @@ import ImageShadow from 'react-image-shadow';
77
import './demo.less';
88
import '../../assets/index.less';
99

10+
const url1 =
11+
'https://github.com/image-component/gallery/blob/main/girl/3.jpg?raw=true';
12+
const url2 =
13+
'https://github.com/image-component/gallery/blob/main/girl/6.jpg?raw=true';
14+
const url3 =
15+
'https://github.com/image-component/gallery/blob/main/girl/8.png?raw=true';
16+
1017
const App = () => {
1118
return (
1219
<div className="base-demo">
13-
<ImageShadow
14-
shadowHover
15-
src="https://github.com/image-tool/react-image-shadow/blob/main/image/red.png?raw=true"
16-
></ImageShadow>
17-
<ImageShadow
18-
shadowHover
19-
src="https://github.com/image-tool/react-image-shadow/blob/main/image/blue.jpg?raw=true"
20-
></ImageShadow>
21-
<ImageShadow
22-
shadowHover
23-
src="https://github.com/image-tool/react-image-shadow/blob/main/image/white.jpg?raw=true"
24-
></ImageShadow>
20+
<ImageShadow shadowHover src={url1}></ImageShadow>
21+
<ImageShadow shadowHover src={url2}></ImageShadow>
22+
<ImageShadow shadowHover src={url3}></ImageShadow>
2523
</div>
2624
);
2725
};

image/blue.jpg

-79.5 KB
Binary file not shown.

image/red.png

-47.2 KB
Binary file not shown.

image/white.jpg

-81 KB
Binary file not shown.

logo.png

-20 KB
Binary file not shown.

0 commit comments

Comments
 (0)