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' } +```