Unverified Commit 95168bf1 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Fix third party typings (#59503)

parent bd5157c7
export * from './dist/types/index' export * from './dist/google/index'
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
} }
}, },
"files": [ "files": [
"dist" "dist",
"google.d.ts"
], ],
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
......
...@@ -4,8 +4,8 @@ import React, { useEffect } from 'react' ...@@ -4,8 +4,8 @@ import React, { useEffect } from 'react'
export type ScriptEmbed = { export type ScriptEmbed = {
html?: string | null html?: string | null
height?: number | null height?: string | number | null
width?: number | null width?: string | number | null
children?: React.ReactElement | React.ReactElement[] children?: React.ReactElement | React.ReactElement[]
dataNtpc?: string dataNtpc?: string
} }
......
import React from 'react'
import { GoogleMapsEmbed as TPCGoogleMapEmbed } from 'third-party-capital' import { GoogleMapsEmbed as TPCGoogleMapEmbed } from 'third-party-capital'
import ThirdPartyScriptEmbed from '../ThirdPartyScriptEmbed' import ThirdPartyScriptEmbed from '../ThirdPartyScriptEmbed'
......
...@@ -19,14 +19,15 @@ export type GAParams = { ...@@ -19,14 +19,15 @@ export type GAParams = {
} }
export type GoogleMapsEmbed = { export type GoogleMapsEmbed = {
height?: number height?: number | string
width?: number width?: number | string
mode: 'place' | 'view' | 'directions' | 'streetview' | 'search' mode: 'place' | 'view' | 'directions' | 'streetview' | 'search'
apiKey: string apiKey: string
style: string style?: string
allowfullscreen: boolean allowfullscreen?: boolean
loading: 'eager' | 'lazy' loading?: 'eager' | 'lazy'
q?: string q?: string
id?: string
center?: string center?: string
zoom?: string zoom?: string
maptype?: string maptype?: string
......
...@@ -9,7 +9,7 @@ const Page = () => { ...@@ -9,7 +9,7 @@ const Page = () => {
} }
return ( return (
<div class="container"> <div className="container">
<GoogleAnalytics gaId="GA-XYZ" /> <GoogleAnalytics gaId="GA-XYZ" />
<h1>GA</h1> <h1>GA</h1>
<button id="ga-send" onClick={onClick}> <button id="ga-send" onClick={onClick}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment