From 2d18697c95872ae31396ce5842282854845482a5 Mon Sep 17 00:00:00 2001 From: Lucas Bebber Date: Wed, 2 Oct 2019 19:35:25 -0300 Subject: [PATCH] Update docs --- README.md | 13 ++++++++++++- docs/README.md | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 56b7616..badc778 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Utility for generating CSS handles for store components. 🚧 Under Construction 🚧 -### Usage +## Usage ```tsx import React, { FunctionComponent } from 'react' @@ -35,3 +35,14 @@ const Component: FunctionComponent = () => { ) } ``` + +### Options + +- `migrationFrom`: Adds additional CSS handles for cases where a component is migrating from another app. + +#### Usage: +```tsx +const CSS_HANDLES = ['container'] +const handles = useCssHandles(CSS_HANDLES, { migrationFrom: 'vtex.store-components@2.x' }) +// Returns { container: 'vtex-current-app-0-x-container vtex-store-components-2-x-container' } +``` diff --git a/docs/README.md b/docs/README.md index 56b7616..badc778 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ Utility for generating CSS handles for store components. 🚧 Under Construction 🚧 -### Usage +## Usage ```tsx import React, { FunctionComponent } from 'react' @@ -35,3 +35,14 @@ const Component: FunctionComponent = () => { ) } ``` + +### Options + +- `migrationFrom`: Adds additional CSS handles for cases where a component is migrating from another app. + +#### Usage: +```tsx +const CSS_HANDLES = ['container'] +const handles = useCssHandles(CSS_HANDLES, { migrationFrom: 'vtex.store-components@2.x' }) +// Returns { container: 'vtex-current-app-0-x-container vtex-store-components-2-x-container' } +```