Skip to content

Commit 835dca7

Browse files
authored
Merge pull request #133 from incluud/next
chore(Components): Bump version to 3.3.1 and update `accessible-astro-components` to 4.1.0; add Avatar and Badge components to examples
2 parents 463e421 + 71a95c8 commit 835dca7

File tree

2 files changed

+51
-9
lines changed

2 files changed

+51
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "accessible-astro-starter",
33
"description": "An Accessible Starter Theme for Astro including several accessibility features and tools to help you build faster.",
4-
"version": "3.4.0",
4+
"version": "3.4.1",
55
"author": "Incluud",
66
"license": "MIT",
77
"homepage": "https://accessible-astro.netlify.app/",
@@ -54,6 +54,6 @@
5454
"tailwindcss": "^3.4.15"
5555
},
5656
"dependencies": {
57-
"accessible-astro-components": "^4.0.2"
57+
"accessible-astro-components": "^4.1.0"
5858
}
5959
}

src/pages/accessible-components.astro

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import { Icon } from 'astro-icon/components'
44
import {
55
Accordion,
66
AccordionItem,
7+
Avatar,
8+
AvatarGroup,
9+
Badge,
710
Breadcrumbs,
811
BreadcrumbsItem,
912
Card,
13+
DarkMode,
1014
Media,
1115
Modal,
1216
Notification,
@@ -116,6 +120,35 @@ import {
116120
</AccordionItem>
117121
</Accordion>
118122
</div>
123+
<div class="space-content">
124+
<h2>Avatar</h2>
125+
<div class="flex-w flex gap-3">
126+
<Avatar initials="MT" label="Mark Teekman" />
127+
<Avatar initials="PP" label="Peter Padberg" type="info" shape="square" />
128+
<Avatar
129+
label="Astronout"
130+
img="https://images.unsplash.com/photo-1620428268482-cf1851a36764?auto=format&fit=crop&q=100&w=800"
131+
/>
132+
</div>
133+
<Avatar title="Mark Teekman" subtitle="Developer & A11Y Expert" />
134+
<AvatarGroup>
135+
<Avatar size="sm" label="Developer" initials="DV" />
136+
<Avatar size="sm" type="info" label="Designer" initials="DS" />
137+
<Avatar size="sm" type="success" label="Product Manager" initials="PM" />
138+
<Avatar size="sm" type="warning" label="Marketing" initials="MK" />
139+
<Avatar size="sm" type="error" label="Marketing" initials="MK" />
140+
</AvatarGroup>
141+
</div>
142+
<div class="space-content">
143+
<h2>Badge</h2>
144+
<div class="flex flex-wrap gap-2">
145+
<Badge type="default">Default</Badge>
146+
<Badge type="info">Info</Badge>
147+
<Badge type="success">Success</Badge>
148+
<Badge type="warning">Warning</Badge>
149+
<Badge type="error">Error</Badge>
150+
</div>
151+
</div>
119152
<div class="space-content">
120153
<h2>Breadcrumbs</h2>
121154
<Breadcrumbs>
@@ -161,7 +194,7 @@ import {
161194
<div class="space-content">
162195
<h2>Cards</h2>
163196
<Card
164-
img="https://images.unsplash.com/photo-1620428268482-cf1851a36764?auto=format&fit=crop&q=80&w=800"
197+
img="https://images.unsplash.com/photo-1620428268482-cf1851a36764?auto=format&fit=crop&q=100&w=800"
165198
title="Card Title"
166199
footer="Author name"
167200
>
@@ -176,13 +209,19 @@ import {
176209
</div>
177210
<div class="space-content">
178211
<h2>DarkMode Toggle</h2>
179-
<p>This component can be viewed in the top right corner besides the main navigation.</p>
212+
<div class="flex gap-2">
213+
<DarkMode />
214+
<DarkMode>
215+
<Icon name="ion:bulb" slot="light" />
216+
<Icon name="ion:bulb-outline" slot="dark" />
217+
</DarkMode>
218+
</div>
180219
</div>
181220
<div class="space-content">
182221
<h2>Media</h2>
183222
<Media
184223
class="rounded-lg"
185-
src="https://images.unsplash.com/photo-1620428268482-cf1851a36764?auto=format&fit=crop&q=80&w=800"
224+
src="https://images.unsplash.com/photo-1620428268482-cf1851a36764?auto=format&fit=crop&q=100&w=800"
186225
/>
187226
</div>
188227
<div class="space-content">
@@ -232,8 +271,11 @@ import {
232271
<Pagination totalPages="200" />
233272
</div>
234273
<div class="space-content">
235-
<h2>SkipLinks</h2>
236-
<p>This component can be viewed by shift+tabbing until they show up.</p>
274+
<h2>SkipLink</h2>
275+
<p>
276+
The SkipLink component becomes visible when you shift+tab to navigate backward through the page, it's the
277+
first focusable element on the page.
278+
</p>
237279
</div>
238280
</div>
239281
<div class="my-32"></div>
@@ -261,11 +303,11 @@ import {
261303
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
262304
<Media
263305
class="rounded-lg"
264-
src="https://images.unsplash.com/photo-1636819488537-a9b1ffb315ce?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=800&q=80"
306+
src="https://images.unsplash.com/photo-1636819488537-a9b1ffb315ce?auto=format&fit=crop&w=800&q=100"
265307
/>
266308
<Media
267309
class="rounded-lg"
268-
src="https://images.unsplash.com/photo-1636819488537-a9b1ffb315ce?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=800&q=80"
310+
src="https://images.unsplash.com/photo-1636819488537-a9b1ffb315ce?auto=format&fit=crop&w=800&q=100"
269311
/>
270312
</div>
271313
<p>

0 commit comments

Comments
 (0)