From ec28fa1e813228069d6bdf7ef51422c4726b79cf Mon Sep 17 00:00:00 2001 From: lxieyang Date: Sun, 21 Feb 2021 15:52:01 -0500 Subject: [PATCH] devtools support --- README.md | 1 + src/pages/Devtools/index.js | 6 +++++- src/pages/Panel/Panel.tsx | 3 +-- src/pages/Panel/index.html | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d09de0c8d..f03396a64 100755 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ - **_Recently updated from React ~~16~~ to 17 and Webpack ~~4~~ to 5!_** - **_Recently added [TypeScript](https://www.typescriptlang.org/) Support!_** +- **_Recently added [devtools](https://developer.chrome.com/docs/extensions/mv3/devtools/) Support! Thanks [GeekaholicLin](https://github.com/lxieyang/chrome-extension-boilerplate-react/issues/17)!_** ## Features diff --git a/src/pages/Devtools/index.js b/src/pages/Devtools/index.js index 72b169625..647319a1f 100644 --- a/src/pages/Devtools/index.js +++ b/src/pages/Devtools/index.js @@ -1 +1,5 @@ -chrome.devtools.panels.create('Dev Tools', 'icon-34.png', 'panel.html'); +chrome.devtools.panels.create( + 'Dev Tools from chrome-extension-boilerplate-react', + 'icon-34.png', + 'panel.html' +); diff --git a/src/pages/Panel/Panel.tsx b/src/pages/Panel/Panel.tsx index 072467c51..7126ce8a7 100644 --- a/src/pages/Panel/Panel.tsx +++ b/src/pages/Panel/Panel.tsx @@ -1,8 +1,7 @@ import React from 'react'; - import './Panel.css'; -const Panel = (): JSX.Element => { +const Panel: React.FC = () => { return (

Dev Tools Panel

diff --git a/src/pages/Panel/index.html b/src/pages/Panel/index.html index 94f6582d6..7eee39a3b 100644 --- a/src/pages/Panel/index.html +++ b/src/pages/Panel/index.html @@ -2,7 +2,7 @@ - Panel + Dev Tools Panel