From 640f58f0029a1c1fd9705896b0ff813a6d936b45 Mon Sep 17 00:00:00 2001 From: Jacob Parker Date: Fri, 7 Jun 2019 09:06:58 +0100 Subject: [PATCH] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32de7df..2096b4c 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ There is also support for the `box-shadow` shorthand, and this converts into `sh # API -The API is mostly for implementors. However, the main API may be useful for non-implementors. The main API is, +The API is mostly for implementors. However, the main API may be useful for non-implementors. The main API is an array of `[property, value]` tuples. ```js import transform from 'css-to-react-native'; @@ -84,7 +84,11 @@ transform([ ]); // => { fontFamily: 'Helvetica', ... } ``` -For implementors, there is also, +We don't provide a way to get these style tuples in this library, so you'll need to do that yourself. I expect most people will use postCSS or another CSS parser. You should try avoid getting these with `string.split`, as that has a lot of edge cases (colons and semi-colons apearing in comments etc.) + +For implementors, there is also a few extra APIs available. + +These are for specific use-cases, and most people should just be using the API above. ```js import { getPropertyName, getStylesForProperty } from 'css-to-react-native';