From 6dff18670146d3b25bd5798cac945de72dd680d7 Mon Sep 17 00:00:00 2001 From: netroby Date: Tue, 23 Aug 2016 11:16:45 +0800 Subject: [PATCH] Add code highlight for readme.md --- README.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e0d443dd..449d6f7e 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,13 @@ And furthermore: 1. Install library from npm. -``` +```bash npm install react-native-svg --save ``` 2 . Link native code -``` +```bash react-native link react-native-svg ``` react-native@0.29.0 and 0.29.1 cannot work with Android link properly:[here](https://github.com/facebook/react-native/pull/8612) @@ -40,7 +40,7 @@ react-native@0.29.0 and 0.29.1 cannot work with Android link properly:[here](htt Or use rnpm instead -``` +```bash rnpm link react-native-svg ``` @@ -49,7 +49,7 @@ rnpm link react-native-svg There is an easy example -``` +```javascript import Svg,{ Circle, Ellipse, @@ -128,7 +128,7 @@ originY | 0 | Transform originY coordinates for the current obj ##### Svg -``` +```html -; + ``` ##### Rect The element is used to create a rectangle and variations of a rectangle shape: -``` +```html element is used to create a rectangle and variations of a rectangle s The element is used to create a circle: -``` +```html element is used to create an ellipse. An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius -``` +```html element is an SVG basic shape, used to create a line connecting two points. -``` +```html element is used to create a graphic that contains at least three s Polygons are made of straight lines, and the shape is "closed" (all the lines connect up). -``` +```html element is used to create any shape that consists of only straight lines: -``` +```html element is used to define a text. -``` +```html element is used to define a text. The element is a container used to group other SVG elements. Transformations applied to the g element are performed on all of its child elements, and any of its props are inherited by its child elements. It can also group multiple elements to be referenced later with the [<Use />](#use) element. -``` +```html element can reuse an SVG shape from elsewhere in the SVG document, inc The reused shape can be defined inside the [<Defs>](#defs) element (which makes the shape invisible until used) or outside. -``` +```html element specifies where to show the reused shapes via its x and y prop The SVG element is used to define reusable symbols. The shapes nested inside a are not displayed unless referenced by a element. -``` +```html @@ -533,7 +533,7 @@ But I recommend you to use exact number instead, it has more performance advanta The element is used to define a radial gradient. The element must be nested within a [<Defs>](#defs) tag. The [<Defs>](#defs) tag is short for definitions and contains definition of special elements (such as gradients). -``` +```html