-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
17219f7
commit 441669b
Showing
14 changed files
with
159 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { defineConfig } from 'astro/config' | ||
import tailwind from '@astrojs/tailwind' | ||
import mdx from '@astrojs/mdx' | ||
import react from '@astrojs/react' | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [tailwind(), mdx()] | ||
integrations: [tailwind(), mdx(), react()] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default function ButtonGroup() { | ||
return ( | ||
<div class="button-group"> | ||
<button class="button">add</button> | ||
<button class="button">random</button> | ||
<button class="button">notes</button> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Button() { | ||
return <button class="button border-2">Example button</button> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export default function Card() { | ||
return ( | ||
<div class="card w-full"> | ||
<div class="card__body"> | ||
<h2 class="card__title">Your Gateway to Timeless Literature</h2> | ||
<p> | ||
Welcome to OMUSO API, a digital service for literature enthusiasts and | ||
developrs. Our platform leverages a powerful API to bring you an | ||
extensive collection of classical texts and detailed information about | ||
their authors, making it easier than ever to delve into the world’s | ||
most treasured literary works. | ||
</p> | ||
</div> | ||
<div class="card__actions text-right"> | ||
<button class="button">Start →</button> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default function Select() { | ||
return ( | ||
<select class="select border-2"> | ||
<option disabled selected> | ||
Choose an option | ||
</option> | ||
<option value="one">Option one</option> | ||
<option value="two">Option two</option> | ||
<option value="three">Option three</option> | ||
</select> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export default function Table() { | ||
return ( | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Date</th> | ||
<th>Amount</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th>First 6 weeks</th> | ||
<td>£109.80 per week</td> | ||
</tr> | ||
<tr> | ||
<th>Next 33 weeks</th> | ||
<td>£109.80 per week</td> | ||
</tr> | ||
<tr> | ||
<th>Total estimated pay</th> | ||
<td>£4,282.20</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: Card | ||
--- | ||
|
||
import Example from '../../components/Example.astro' | ||
import Card from '../../components/lib/card' | ||
export const Component = () => <Card /> | ||
|
||
# Card | ||
|
||
## Variables | ||
|
||
```css | ||
--va-card-color: var(--va-text-normal); | ||
--va-card-font-size: var(--va-font-size-1); | ||
--va-card-padding: var(--va-space-3); | ||
--va-card-border-width: var(--va-border-width); | ||
--va-card-border-color: var(--va-border-color); | ||
--va-card-background-color: var(--va-surface-primary); | ||
``` | ||
|
||
## Default | ||
|
||
<Example | ||
component={Component} | ||
|
||
> | ||
|
||
```js | ||
<div class="card w-full"> | ||
<div class="card__body"> | ||
<h2 class="card__title">Your Gateway to Timeless Literature</h2> | ||
<p> | ||
Welcome to OMUSO API, a digital service for literature enthusiasts and | ||
developrs. Our platform leverages a powerful API to bring you an extensive | ||
collection of classical texts and detailed information about their | ||
authors, making it easier than ever to delve into the world’s most | ||
treasured literary works. | ||
</p> | ||
</div> | ||
<div class="card__actions text-right"> | ||
<button class="button">Start →</button> | ||
</div> | ||
</div> | ||
``` | ||
|
||
</Example> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
--- | ||
import { getCollection } from 'astro:content'; | ||
import Layout from '../../layouts/Page.astro'; | ||
import type { MDXInstance } from 'astro'; | ||
const allComponents = await getCollection('components'); | ||
const links = allComponents.map(({data, slug}) => ({ | ||
text: data.title, | ||
href: `/components/${slug}` | ||
})) | ||
const components = await Astro.glob('../../content/components/*.mdx'); | ||
--- | ||
|
||
<Layout items={links} backHref="/"> | ||
<h1 class="text-4xl font-bold">Components</h1> | ||
<p>{allComponents.length} components</p> | ||
<div class="grid grid-cols-2 gap-8"> | ||
{allComponents.map(({data, slug}) => { | ||
const { Component }: any = components.find((item) => item.frontmatter.title === data.title) | ||
return ( | ||
<div class="card"> | ||
<div class="card__body aspect-video grid place-content-center"> | ||
{Component ? <Component /> : <h2>{data.title}</h2>} | ||
</div> | ||
<div class="card__actions"> | ||
<a href={`/components/${slug}`} class="button">More info →</a> | ||
</div> | ||
</div> | ||
) | ||
})} | ||
</div> | ||
</Layout> | ||
|