Fix deprecated message (#950)

This commit is contained in:
Fábio Rosado
2022-11-14 20:06:21 +00:00
committed by GitHub
parent da2728e6df
commit a9ca7106cb
4 changed files with 7 additions and 7 deletions

View File

@@ -21,8 +21,8 @@ export class PyBox extends HTMLElement {
connectedCallback() { connectedCallback() {
const deprecationMessage = ( const deprecationMessage = (
'<p>The element &lt;py-box&gt; is deprecated, you should create a ' + 'The element <py-box> is deprecated, you should create a ' +
'div with "py-box" class name instead. For example: &lt;div class="py-box"&gt; ' 'div with "py-box" class name instead. For example: <div class="py-box">'
) )
createDeprecationWarning(deprecationMessage, "py-box") createDeprecationWarning(deprecationMessage, "py-box")
const mainDiv = document.createElement('div'); const mainDiv = document.createElement('div');

View File

@@ -43,8 +43,8 @@ export function make_PyButton(runtime: Runtime) {
async connectedCallback() { async connectedCallback() {
const deprecationMessage = ( const deprecationMessage = (
'<p>The element &lt;py-button&gt; is deprecated, create a function with your ' + 'The element <py-button> is deprecated, create a function with your ' +
'inline code and use &lt;button py-click="function()" class="py-button"&gt; instead.</p>' 'inline code and use <button py-click="function()" class="py-button"> instead.'
) )
createDeprecationWarning(deprecationMessage, "py-button") createDeprecationWarning(deprecationMessage, "py-button")

View File

@@ -22,8 +22,8 @@ export function make_PyInputBox(runtime: Runtime) {
async connectedCallback() { async connectedCallback() {
const deprecationMessage = ( const deprecationMessage = (
'<p>The element &lt;py-input&gt; is deprecated, ' + 'The element <py-input> is deprecated, ' +
'use &lt;input class="py-input"&gt; instead.</p>' 'use <input class="py-input"> instead.'
) )
createDeprecationWarning(deprecationMessage, "py-input") createDeprecationWarning(deprecationMessage, "py-input")
ensureUniqueId(this); ensureUniqueId(this);

View File

@@ -10,7 +10,7 @@ export class PyTitle extends HTMLElement {
connectedCallback() { connectedCallback() {
const deprecationMessage = ( const deprecationMessage = (
'<p>The element &lt;py-title&gt; is deprecated, please use an &lt;h1&gt; tag instead.</p>' 'The element <py-title> is deprecated, please use an <h1> tag instead.'
) )
createDeprecationWarning(deprecationMessage, "py-title") createDeprecationWarning(deprecationMessage, "py-title")
this.label = htmlDecode(this.innerHTML); this.label = htmlDecode(this.innerHTML);