mirror of
https://github.com/kremalicious/blog.git
synced 2024-06-28 08:37:57 +02:00
19 lines
333 B
Plaintext
19 lines
333 B
Plaintext
---
|
|
import styles from './index.module.css'
|
|
|
|
type Props = {
|
|
i: number
|
|
slug: string
|
|
current?: boolean
|
|
}
|
|
|
|
const { i, slug, current } = Astro.props
|
|
|
|
const classes = current ? `${styles.number} ${styles.current}` : styles.number
|
|
const link = i === 0 ? slug : `${slug}/${i + 1}/`
|
|
---
|
|
|
|
<a class={classes} href={link}>
|
|
{i + 1}
|
|
</a>
|