summaryrefslogtreecommitdiff
path: root/examples/component/packages/my-component
diff options
context:
space:
mode:
authorGravatar Mohammed Elhaouari <9967336+mohammed-elhaouari@users.noreply.github.com> 2022-08-26 15:16:17 +0100
committerGravatar GitHub <noreply@github.com> 2022-08-26 10:16:17 -0400
commit5fbb359afb807311ad8bb82d83912d8d6d75da10 (patch)
treec4fd6cf836e095d5214bdd26869729cfaf123fc4 /examples/component/packages/my-component
parentb3db2c3c4b182fc7605dcb4f3fcd97f6f9688c14 (diff)
downloadastro-5fbb359afb807311ad8bb82d83912d8d6d75da10.tar.gz
astro-5fbb359afb807311ad8bb82d83912d8d6d75da10.tar.zst
astro-5fbb359afb807311ad8bb82d83912d8d6d75da10.zip
Remove "as Props" from the astro examples (#4494)
Diffstat (limited to 'examples/component/packages/my-component')
-rw-r--r--examples/component/packages/my-component/Button.astro2
-rw-r--r--examples/component/packages/my-component/Heading.astro2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/component/packages/my-component/Button.astro b/examples/component/packages/my-component/Button.astro
index 5f32ce4e8..87943fa28 100644
--- a/examples/component/packages/my-component/Button.astro
+++ b/examples/component/packages/my-component/Button.astro
@@ -5,7 +5,7 @@ export interface Props extends Record<any, any> {
const { type, ...props } = {
...Astro.props,
-} as Props;
+};
props.type = type || 'button';
---
diff --git a/examples/component/packages/my-component/Heading.astro b/examples/component/packages/my-component/Heading.astro
index 813c0c11b..75e4aa4e0 100644
--- a/examples/component/packages/my-component/Heading.astro
+++ b/examples/component/packages/my-component/Heading.astro
@@ -6,7 +6,7 @@ export interface Props extends Record<any, any> {
const { level, role, ...props } = {
...Astro.props,
-} as Props;
+};
props.role = role || 'heading';
props['aria-level'] = level || '1';