Skip to content

Commit

Permalink
chore: add class property to h2 component
Browse files Browse the repository at this point in the history
  • Loading branch information
niccofyren committed Oct 16, 2024
1 parent 8d03885 commit 8a43bab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/H2.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
type Props = {
text: string;
color?: string;
class?: string;
};
const { text, color = "text-white" } = Astro.props;
const { text, color = "text-white", class: classNames = "" } = Astro.props;
---

<h2 class=`text-4xl ${color} font-bold mb-2`>{text}</h2>
<h2 class=`text-4xl ${color} font-bold mb-2 ${classNames}`>{text}</h2>

0 comments on commit 8a43bab

Please sign in to comment.