-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix web-example app path and format examples (#2524)
# Summary A minor change in web example app to fix SVG path and reformat examples with prettier/lint
- Loading branch information
Showing
17 changed files
with
91 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
import React from 'react'; | ||
import { SvgUri } from 'react-native-svg'; | ||
|
||
import {SvgUri} from 'react-native-svg'; | ||
|
||
export default () => { | ||
const [uri, setUri] = React.useState('https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/not_existing.svg') | ||
const [uri, setUri] = React.useState( | ||
'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/not_existing.svg', | ||
); | ||
|
||
return ( | ||
<> | ||
<SvgUri | ||
onError={() => setUri('https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/ruby.svg')} | ||
onError={() => | ||
setUri( | ||
'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/ruby.svg', | ||
) | ||
} | ||
width="100" | ||
height="100" | ||
uri={uri} | ||
/> | ||
</> | ||
); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,32 @@ | ||
import * as React from 'react'; | ||
import { View } from 'react-native'; | ||
import {View} from 'react-native'; | ||
import Svg, {Rect} from 'react-native-svg'; | ||
|
||
export default function App() { | ||
|
||
return ( | ||
<View style={{flex: 1}}> | ||
<Svg width="100%" height="100%" viewBox="0 0 56 56" color="red"> | ||
<Rect width="20" height="20" rx="4" fill="currentColor" opacity={0.2} /> | ||
<Rect x="0" y="25" width="20" height="20" rx="4" fill="red" opacity={0.2} /> | ||
<Rect x="25" y="0" width="20" height="20" rx="4" fill="red" /> | ||
<Rect x="25" y="25" width="20" height="20" rx="4" fill="blue" fillOpacity="0.2" /> | ||
</Svg> | ||
</View> | ||
<Rect width="20" height="20" rx="4" fill="currentColor" opacity={0.2} /> | ||
<Rect | ||
x="0" | ||
y="25" | ||
width="20" | ||
height="20" | ||
rx="4" | ||
fill="red" | ||
opacity={0.2} | ||
/> | ||
<Rect x="25" y="0" width="20" height="20" rx="4" fill="red" /> | ||
<Rect | ||
x="25" | ||
y="25" | ||
width="20" | ||
height="20" | ||
rx="4" | ||
fill="blue" | ||
fillOpacity="0.2" | ||
/> | ||
</Svg> | ||
</View> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3357,6 +3357,14 @@ css-select@^5.1.0: | |
domutils "^3.0.1" | ||
nth-check "^2.0.1" | ||
|
||
css-tree@^1.1.3: | ||
version "1.1.3" | ||
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" | ||
integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== | ||
dependencies: | ||
mdn-data "2.0.14" | ||
source-map "^0.6.1" | ||
|
||
css-tree@^2.3.1: | ||
version "2.3.1" | ||
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.3.1.tgz#10264ce1e5442e8572fc82fbe490644ff54b5c20" | ||
|
@@ -5870,6 +5878,11 @@ md5hex@^1.0.0: | |
resolved "https://registry.yarnpkg.com/md5hex/-/md5hex-1.0.0.tgz#ed74b477a2ee9369f75efee2f08d5915e52a42e8" | ||
integrity sha512-c2YOUbp33+6thdCUi34xIyOU/a7bvGKj/3DB1iaPMTuPHf/Q2d5s4sn1FaCOO43XkXggnb08y5W2PU8UNYNLKQ== | ||
|
||
[email protected]: | ||
version "2.0.14" | ||
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" | ||
integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== | ||
|
||
[email protected]: | ||
version "2.0.28" | ||
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.28.tgz#5ec48e7bef120654539069e1ae4ddc81ca490eba" | ||
|
@@ -6988,7 +7001,7 @@ react-native-svg-transformer@^1.4.0: | |
"@svgr/plugin-svgo" "^8.1.0" | ||
path-dirname "^1.0.2" | ||
|
||
"react-native-svg@link:..": | ||
"react-native-svg@link:../..": | ||
version "0.0.0" | ||
uid "" | ||
|
||
|
@@ -8420,7 +8433,7 @@ walker@^1.0.7, walker@^1.0.8: | |
dependencies: | ||
makeerror "1.0.12" | ||
|
||
warn-once@^0.1.0: | ||
warn-once@0.1.1, warn-once@^0.1.0: | ||
version "0.1.1" | ||
resolved "https://registry.yarnpkg.com/warn-once/-/warn-once-0.1.1.tgz#952088f4fb56896e73fd4e6a3767272a3fccce43" | ||
integrity sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q== | ||
|