Skip to content

Commit 1c01307

Browse files
author
Marek Rozmus
committed
Merge branch 'update_example_for_dev_and_sandbox'
2 parents 14f3d20 + b2e8454 commit 1c01307

15 files changed

+134
-226
lines changed

examples/images/delete.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/images/icons.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import React from 'react';
2+
3+
const Svg = props => (
4+
<svg
5+
xmlns="http://www.w3.org/2000/svg"
6+
width="100%"
7+
height="100%"
8+
viewBox="0 0 24 24"
9+
{...props}
10+
/>
11+
);
12+
13+
export const DeleteIcon = () => (
14+
<Svg>
15+
<path fill="none" d="M0 0h24v24H0V0z" />
16+
<path d="M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z" />
17+
</Svg>
18+
);
19+
20+
export const MailIcon = () => (
21+
<Svg>
22+
<path fill="none" d="M0 0h24v24H0V0z" />
23+
<path d="M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 4.99L4 6h16zm0 12H4V8l8 5 8-5v10z" />
24+
</Svg>
25+
);
26+
27+
export const ReplyIcon = () => (
28+
<Svg>
29+
<path fill="none" d="M0 0h24v24H0V0z" />
30+
<path d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z" />
31+
</Svg>
32+
);

examples/images/mail.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/images/reply.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/package-lock.json

Lines changed: 10 additions & 184 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"scripts": {
2525
"predeploy": "webpack --mode production",
2626
"start": "webpack-dev-server",
27+
"dev": "webpack-dev-server --config webpack.config.dev.js",
2728
"deploy": "gh-pages -d dist"
2829
},
2930
"devDependencies": {
@@ -33,7 +34,6 @@
3334
"@babel/preset-react": "^7.0.0",
3435
"babel-eslint": "^10.0.3",
3536
"babel-loader": "^8.0.6",
36-
"classnames": "^2.2.6",
3737
"css-loader": "^3.2.0",
3838
"eslint": "^6.3.0",
3939
"eslint-config-prettier": "^6.2.0",
@@ -43,7 +43,6 @@
4343
"gh-pages": "^2.1.1",
4444
"html-webpack-plugin": "^3.2.0",
4545
"prettier": "^1.18.2",
46-
"react-svg-loader": "^3.0.3",
4746
"style-loader": "^1.0.0",
4847
"stylelint": "^11.0.0",
4948
"stylelint-config-standard": "^19.0.0",
@@ -53,6 +52,8 @@
5352
"webpack-dev-server": "^3.8.0"
5453
},
5554
"dependencies": {
55+
"@sandstreamdev/react-swipeable-list": "^0.2.1",
56+
"@sandstreamdev/std": "^0.1.2",
5657
"react": "^16.9.0",
5758
"react-dom": "^16.9.0"
5859
}

examples/src/App.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import React, { useState } from 'react';
2-
import { SwipeableList, SwipeableListItem } from 'react-swipeable-list';
2+
import {
3+
SwipeableList,
4+
SwipeableListItem
5+
} from '@sandstreamdev/react-swipeable-list';
6+
import '@sandstreamdev/react-swipeable-list/dist/styles.css';
37

48
import ListItem from './ComplexListItem';
59
import ComplexItemContent from './ComplexItemContent';
6-
import MailIcon from '../images/mail.svg';
7-
import ReplyIcon from '../images/reply.svg';
8-
import DeleteIcon from '../images/delete.svg';
9-
import styles from './app.css';
10+
import { MailIcon, ReplyIcon, DeleteIcon } from '../images/icons';
11+
import styles from './app.module.css';
1012

1113
function App() {
1214
const [triggeredSimpleItemAction, triggerSimpleItemAction] = useState('');

0 commit comments

Comments
 (0)