@ryandejaegher/my-component

0.0.6 • Public • Published

Example @example/my-component

This is an example package, exported as @example/my-component. It consists of two Astro components, Button and Heading.

Button

The Button component generates a <button> with a default type of button.

---
import * as Component from '@example/my-component'
---
<Component.Button>Plain Button</Component.Button>
<!-- generated html -->
<button type="button">Plain Button</button>

Heading

The Heading component generates an <h> tag with a default role of heading and a level attribute that gets written to aria-level.

---
import * as Component from '@example/my-component'
---
<Component.Heading>Heading</Component.Heading>
<Component.Heading level="2">Subheading</Component.Heading>
<!-- generated html -->
<h role="heading" aria-level="1">Plain Button</h>
<h role="heading" aria-level="2">Subheading</h>

Package Sidebar

Install

npm i @ryandejaegher/my-component

Weekly Downloads

0

Version

0.0.6

License

none

Unpacked Size

1.72 kB

Total Files

5

Last publish

Collaborators

  • ryandejaegher