started workshop pages

This commit is contained in:
Felix Roos 2023-05-26 14:12:53 +02:00
parent 2177e13b49
commit 82225f0b81
13 changed files with 431 additions and 5 deletions

View file

@ -0,0 +1,10 @@
---
import LightBulbIcon from '@heroicons/react/20/solid/LightBulbIcon';
//import MusicalNoteIcon from '@heroicons/react/20/solid/MusicalNoteIcon';
---
<div class="py-1 px-6 pr-10 bg-lineHighlight relative mb-4">
<div><slot /></div>
<LightBulbIcon className="w-5 h-5 absolute top-4 right-4" />
<!-- <MusicalNoteIcon className="w-5 h-5 absolute top-4 right-4" /> -->
</div>

View file

@ -0,0 +1,18 @@
import ChevronDownIcon from '@heroicons/react/20/solid/ChevronDownIcon';
import ChevronUpIcon from '@heroicons/react/20/solid/ChevronUpIcon';
import { useState } from 'react';
export default function QA({ children, q }) {
const [visible, setVisible] = useState(false);
return (
<div className="py-4 px-6 pr-10 bg-lineHighlight relative mb-4">
<div className="cursor-pointer" onClick={() => setVisible((v) => !v)}>
<div>{q}</div>
<a className="p-1 absolute top-4 right-4">
{visible ? <ChevronUpIcon className="w-5 h-5" /> : <ChevronDownIcon className="w-5 h-5" />}
</a>
</div>
{visible && <div>{children}</div>}
</div>
);
}