mirror of
https://github.com/Steffo99/unisteffo.git
synced 2024-11-24 17:04:20 +00:00
22 lines
535 B
React
22 lines
535 B
React
|
import { ListUnordered, Code } from "@steffo/bluelib-react"
|
||
|
import { Link } from "./link"
|
||
|
|
||
|
|
||
|
export const MaterialLi = ({children, base, ...files}) => {
|
||
|
const formats = Object.entries(files).map(([k, v], pos) => {
|
||
|
return (
|
||
|
<Link key={pos} href={`${base}/${v}.${k}`}>
|
||
|
<Code>.{k}</Code>
|
||
|
</Link>
|
||
|
)
|
||
|
}).reduce((p, c) => {
|
||
|
return [p, ", ", c]
|
||
|
})
|
||
|
|
||
|
return (
|
||
|
<ListUnordered.Item>
|
||
|
{children} ({formats})
|
||
|
</ListUnordered.Item>
|
||
|
)
|
||
|
}
|