Skip to content

Commit

Permalink
fix: jsx typings
Browse files Browse the repository at this point in the history
  • Loading branch information
tlgimenes committed Jun 25, 2021
1 parent c090ebc commit 99e572a
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 8 deletions.
5 changes: 4 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"version": "0.373.0-alpha.3",
"version": "0.373.0-alpha.4",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"publish": {
"message": "Release: %v"
}
},
"changelogPreset": {
"name": "conventionalcommits"
},
"packages": ["packages/*"]
}
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-google-tag-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vtex/gatsby-plugin-google-tag-manager",
"version": "0.373.0-alpha.3",
"version": "0.373.0-alpha.4",
"repository": {
"type": "git",
"url": "https://github.com/vtex/faststore",
Expand All @@ -23,7 +23,7 @@
],
"license": "MIT",
"devDependencies": {
"@vtex/gatsby-theme-store": "^0.373.0-alpha.3",
"@vtex/gatsby-theme-store": "^0.373.0-alpha.4",
"cross-env": "^7.0.2",
"gatsby": "^3.1.1",
"typescript": "^4.2.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-pixel-facebook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vtex/gatsby-plugin-pixel-facebook",
"version": "0.373.0-alpha.3",
"version": "0.373.0-alpha.4",
"description": "Gatsby plugin for using Facebook Pixel with Store Framework Jamstack",
"repository": {
"type": "git",
Expand All @@ -23,7 +23,7 @@
],
"license": "MIT",
"devDependencies": {
"@vtex/gatsby-theme-store": "^0.373.0-alpha.3",
"@vtex/gatsby-theme-store": "^0.373.0-alpha.4",
"cross-env": "^7.0.2",
"gatsby": "^3.1.1",
"typescript": "^4.2.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-theme-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vtex/gatsby-theme-store",
"version": "0.373.0-alpha.3",
"version": "0.373.0-alpha.4",
"description": "Gatsby theme for building ecommerce websites",
"main": "index.js",
"repository": {
Expand Down Expand Up @@ -55,7 +55,7 @@
"@types/react-helmet-async": "^1.0.3",
"@vtex/gatsby-plugin-i18n": "^0.371.21",
"@vtex/store-sdk": "^0.371.21",
"@vtex/store-ui": "^0.373.0-alpha.3",
"@vtex/store-ui": "^0.373.0-alpha.4",
"cross-env": "^7.0.2",
"gatsby": "^3.1.1",
"gatsby-plugin-next-seo": "^1.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/store-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vtex/store-ui",
"version": "0.373.0-alpha.3",
"version": "0.373.0-alpha.4",
"description": "A lightweight, css framework agnostic component library for React",
"author": "emersonlaurentino",
"license": "MIT",
Expand Down
22 changes: 22 additions & 0 deletions packages/store-ui/src/typings/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
import type { SxStyleProp } from 'theme-ui'
import type { SerializedStyles } from 'emotion'

declare module 'react' {
interface DOMAttributes {
sx?: SxStyleProp
css?: SerializedStyles
}
}

export declare global {
namespace globalThis {
function requestIdleCallback(args: () => void): number
function cancelIdleCallback(id: number): void
}

namespace JSX {
/**
* Do we need to modify `LibraryManagedAttributes` too,
* to make `className` props optional when `css` props is specified?
*/

interface IntrinsicAttributes {
sx?: SxStyleProp
css?: SerializedStyles
}
}
}

0 comments on commit 99e572a

Please sign in to comment.