-
{name}
+
+
{name}
+
+
- Capital
diff --git a/country-explorer/src/components/FavoriteButton.css b/country-explorer/src/components/FavoriteButton.css
new file mode 100644
index 0000000..9ffb4e7
--- /dev/null
+++ b/country-explorer/src/components/FavoriteButton.css
@@ -0,0 +1,35 @@
+.favorite-button {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.4rem;
+ flex-shrink: 0;
+ min-height: 44px;
+ padding: 0.5rem 1rem;
+ font: inherit;
+ color: var(--text-h);
+ background: var(--bg);
+ border: 1px solid var(--border);
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+.favorite-button:hover {
+ background: var(--accent-bg);
+ border-color: var(--accent);
+}
+
+.favorite-button:focus-visible {
+ outline: 2px solid var(--accent);
+ outline-offset: 3px;
+}
+
+.favorite-button[aria-pressed='true'] {
+ color: var(--accent);
+ border-color: var(--accent);
+ background: var(--accent-bg);
+}
+
+.favorite-button__icon {
+ font-size: 1.2em;
+ line-height: 1;
+}
diff --git a/country-explorer/src/components/FavoriteButton.tsx b/country-explorer/src/components/FavoriteButton.tsx
new file mode 100644
index 0000000..8bd1902
--- /dev/null
+++ b/country-explorer/src/components/FavoriteButton.tsx
@@ -0,0 +1,30 @@
+import './FavoriteButton.css';
+
+interface FavoriteButtonProps {
+ isFavorite: boolean;
+ countryName: string;
+ onToggleFavorite: () => void;
+}
+
+function FavoriteButton({ isFavorite, countryName, onToggleFavorite }: FavoriteButtonProps) {
+ const label = isFavorite
+ ? `Remove ${countryName} from favorites`
+ : `Add ${countryName} to favorites`;
+
+ return (
+
+ );
+}
+
+export default FavoriteButton;