Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/component-library/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Preview } from '@storybook/react';
import '../src/assets/fonts.css';

const preview: Preview = {
parameters: {
Expand Down
6 changes: 6 additions & 0 deletions packages/component-library/src/assets/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* CSS Variable for font family - allows easy override by consumers */
:root {
--component-library-font-family: 'Inter', sans-serif;
}
6 changes: 3 additions & 3 deletions packages/component-library/src/components/button/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
gap: 8px;
border: none;
border-radius: 8px;
font-weight: 500;
font-family: sans-serif;
font-weight: 400;
font-family: var(--component-library-font-family);
cursor: pointer;
transition: all 0.2s ease-in-out;
position: relative;
Expand Down Expand Up @@ -152,4 +152,4 @@
to {
transform: rotate(360deg);
}
}
}
10 changes: 5 additions & 5 deletions packages/component-library/src/components/input/Input.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
width: 100%;
border: 1px solid rgb(203, 213, 225);
border-radius: 6px;
font-family: sans-serif;
font-family: var(--component-library-font-family);
transition: all 0.2s ease-in-out;
background-color: white;
color: rgb(15, 23, 42);
Expand Down Expand Up @@ -59,17 +59,17 @@
font-size: 0.875em;
font-weight: 500;
color: rgb(51, 65, 85);
font-family: sans-serif;
font-family: var(--component-library-font-family);
}

.input__error {
font-size: 0.875em;
color: rgb(220, 38, 38);
font-family: sans-serif;
font-family: var(--component-library-font-family);
}

.input__helper {
font-size: 0.875em;
color: rgb(100, 116, 139);
font-family: sans-serif;
}
font-family: var(--component-library-font-family);
}
8 changes: 4 additions & 4 deletions packages/component-library/src/components/modal/Modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
font-size: 1.25em;
font-weight: 600;
color: rgb(15, 23, 42);
font-family: sans-serif;
font-family: var(--component-library-font-family);
}

.modal__content {
font-family: sans-serif;
font-family: var(--component-library-font-family);
font-size: 1rem;
}

Expand All @@ -64,7 +64,7 @@
justify-content: center;
border-radius: 4px;
transition: all 0.2s ease-in-out;
font-family: sans-serif;
font-family: var(--component-library-font-family);
}

.modal__close:hover {
Expand Down Expand Up @@ -104,4 +104,4 @@
transform: translateY(0);
opacity: 1;
}
}
}
2 changes: 2 additions & 0 deletions packages/component-library/src/font.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Global styles (includes Inter font from Google Fonts)
import './assets/fonts.css';
Loading