Mirror of the sourcecode for my blog, original repo: https://github.com/NobbZ/blog-nobbz-dev
at code-meta 37 lines 567 B view raw
1--- 2// SPDX-FileCopyrightText: 2025 Norbert Melzer 3// SPDX-FileContributor: Norbert Melzer 4// 5// SPDX-License-Identifier: MIT 6 7export interface Props { 8 href: string; 9 disabled?: boolean; 10 spacer?: boolean; 11} 12 13const { href, disabled, spacer } = Astro.props; 14 15const enabled = !disabled; 16 17let classes = []; 18if (spacer) { 19 classes.push("mb-4"); 20} 21--- 22 23<li class:list={["text-center", "p-2", ...classes]}> 24 { 25 enabled ? ( 26 <a href={href}> 27 <slot /> 28 </a> 29 ) : ( 30 <a> 31 <s> 32 <slot /> 33 </s> 34 </a> 35 ) 36 } 37</li>