diff --git a/src/components/ExampleConfigure.astro b/src/components/ExampleConfigure.astro index 2d1c68b21..b4e126b78 100644 --- a/src/components/ExampleConfigure.astro +++ b/src/components/ExampleConfigure.astro @@ -12,7 +12,7 @@ const customElement = customElements.find((customElement) => customElement.name const cem = cesm.tags.find((tag) => tag.name === componentName); const htmlContent = Astro.props.src; -const attributes = cem?.attributes; +const attributes = cem?.attributes.filter((attribute) => !attribute.deprecated); const typeAttributeIndex = attributes?.findIndex((attribute) => attribute.name === 'type'); const typeAttribute = attributes?.splice(typeAttributeIndex, 1); attributes?.splice(0, 0, typeAttribute[0]); @@ -158,12 +158,12 @@ attributes?.splice(0, 0, typeAttribute[0]); { - cem?.attributes && ( + attributes && (

Attributes

) } { - cem?.attributes?.map((attribute) => { + attributes?.map((attribute) => { const defaultValue = attribute.default?.replaceAll('"', ''); if (attribute.type === 'string') { if (attribute.name === 'icon' || (componentName === 'ns-icon' && attribute.name === 'name') || (componentName !== 'ns-icon' && attribute.description?.includes('icon'))) {