@shopify/react-html
Advanced tools
Comparing version 9.1.0 to 9.2.0
@@ -11,2 +11,6 @@ # Changelog | ||
## 9.2.0 - 2019-08-26 | ||
- New `useLocale` hook for setting the `lang` attribute on HTML | ||
## 9.1.0 - 2019-08-26 | ||
@@ -13,0 +17,0 @@ |
@@ -10,2 +10,3 @@ /// <reference types="react" /> | ||
export declare function useFavicon(source: string): void; | ||
export declare function useLocale(locale: string): void; | ||
export declare function useHtmlAttributes(htmlAttributes: FirstArgument<HtmlManager['addHtmlAttributes']>): void; | ||
@@ -12,0 +13,0 @@ export declare function useBodyAttributes(bodyAttributes: FirstArgument<HtmlManager['addBodyAttributes']>): void; |
@@ -48,2 +48,6 @@ "use strict"; | ||
exports.useFavicon = useFavicon; | ||
function useLocale(locale) { | ||
useDomEffect(function (manager) { return manager.addHtmlAttributes({ lang: locale }); }, [locale]); | ||
} | ||
exports.useLocale = useLocale; | ||
function useHtmlAttributes(htmlAttributes) { | ||
@@ -50,0 +54,0 @@ useDomEffect(function (manager) { return manager.addHtmlAttributes(htmlAttributes); }, [ |
{ | ||
"name": "@shopify/react-html", | ||
"version": "9.1.0", | ||
"version": "9.2.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A component to render your react app with no static HTML.", |
@@ -56,2 +56,6 @@ import {useEffect, useContext} from 'react'; | ||
export function useLocale(locale: string) { | ||
useDomEffect(manager => manager.addHtmlAttributes({lang: locale}), [locale]); | ||
} | ||
export function useHtmlAttributes( | ||
@@ -58,0 +62,0 @@ htmlAttributes: FirstArgument<HtmlManager['addHtmlAttributes']>, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
111500
2330