Skip to content
Snippets Groups Projects
Commit 965cf342 authored by René Rösner's avatar René Rösner
Browse files

Feat: Added chip component (planning#423)

parent 80215815
No related branches found
No related tags found
1 merge request!13Entwicklungsportal: MVP Follow Up
type ChipOptions = {
text: string,
style: string
}
export default ({ text, style }: ChipOptions) => {
return (
<div className={`mx-px my-2 px-3 py-1 text-sm rounded-full text-white ${style}`}>
{text}
</div>
);
};
......@@ -4,6 +4,7 @@ import { fetchServices, ServiceType, Tag } from '@/lib/contentful'
import { documentToHtmlString } from '@contentful/rich-text-html-renderer'
import { IconArrowBigRight, IconSearch } from '@tabler/icons'
import Tooltip from '@/components/Tooltip'
import Chip from "@/components/Chip";
export default function ({ services }) {
const router = useRouter()
......@@ -253,11 +254,8 @@ export default function ({ services }) {
</p>
<div className="container flex">
{service.tags.map((tag : Tag) => {
debugger;
if (tag.fields && tag.fields.name) {
return <div className="mx-px my-2 px-3 py-1 text-sm rounded-full text-white bg-yellow-400">
{tag.fields.name}
</div>
return <Chip text={tag.fields.name} style={'bg-yellow-400'} />
}
})}
</div>
......@@ -269,9 +267,7 @@ export default function ({ services }) {
delayOut={600}
content="Bei diesem Inhalt handelt es sich um einen externen Inhalt, der keiner Qualitätssicherung seitens der FITKO unterliegt."
>
<div className="px-3 py-1 text-sm rounded-full text-white bg-indigo-500 ">
externer Inhalt
</div>
<Chip text={'externer Inhalt'} style={'bg-indigo-500'} />
</Tooltip>
: ''}
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment