refactor(button): consolidate button styles into Button.astro
Extends Button.astro with a center prop, native <button> element support (type, disabled, aria-describedby), harmonised padding (.65rem), and transition. Removes global .button, .button-small, .button-light, and .button-center rules from components.css, layout.css, and typography.css. Converts all inline class="button" usages across Header, HomeHero, HomeFinancialHelp, HomeServicesIntro, FormShell, TeamPage, CareersPage, and FaqPage to the <Button> component. Updates three scoped style selectors to :global() to reach the child component's elements.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
---
|
||||
import Button from '../Button.astro';
|
||||
import type { ServicesIntroSection } from '../../types/home-sections';
|
||||
interface Props { section: ServicesIntroSection }
|
||||
const { section } = Astro.props;
|
||||
@@ -31,7 +32,7 @@ const { section } = Astro.props;
|
||||
<div>
|
||||
<h2 class="no-balance">{section.commitmentsHeading}</h2>
|
||||
<ul class="source-list two-column-list">{section.commitments.map((item) => <li>{item}</li>)}</ul>
|
||||
<a class="button" href={section.commitmentsCta.href}>{section.commitmentsCta.label}</a>
|
||||
<Button href={section.commitmentsCta.href}>{section.commitmentsCta.label}</Button>
|
||||
</div>
|
||||
<img class="gear-photo gear-photo-right" src={`/assets/images/${section.commitmentsImage}`} alt={section.commitmentsImageAlt} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user