-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Type of Change - [x] Feature (change that implements a new feature) - [x] Refactor (change in moving or renaming files, directories etc...) ### # Description Added a new section specifically for font families ### # Related Tickets - Related Issue(s) #22 ### # How Has This Been Tested? 1. Simply run the development server 2. Make some changes **Test Configuration**: - Browser: Google Chrome - Browser version: 127.0.6533.100 (Official Build) (64-bit - Text editor: Visual Studio Code --------- Co-authored-by: MoonbamiOfficial <141120384+MoonbamiOfficial@users.noreply.github.com>
- Loading branch information
1 parent
c91084b
commit 0ee1dbc
Showing
12 changed files
with
129 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { fontFamilies } from "../../../../lib/fontFamiles"; | ||
import { replaceSpacesToDash } from "../../../../utils/replaceSpacesToDash"; | ||
import Styles from "./font-family.module.scss"; | ||
import Card from "../../../ui/card/Card"; | ||
import Grid from "../../../common/grid/Grid"; | ||
|
||
const FontFamilySection = () => { | ||
const renderFontFamilies = () => { | ||
if (fontFamilies) { | ||
return fontFamilies.map((fontFamily) => ( | ||
<Card | ||
style={{ | ||
fontFamily: replaceSpacesToDash(fontFamily.name.toLowerCase()), | ||
}} | ||
details={fontFamily.name} | ||
/> | ||
)); | ||
} | ||
}; | ||
|
||
return <Grid className={`${Styles.grid}`}>{renderFontFamilies()}</Grid>; | ||
}; | ||
|
||
export default FontFamilySection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@import "../../../../styles/variables/colors"; | ||
@import "../../../../styles/variables/border"; | ||
@import "../../../../styles/variables/spacing"; | ||
|
||
.grid { | ||
grid-template-columns: repeat(3, minmax(0, 1fr)); | ||
gap: $lg; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
export const fontFamilies = [ | ||
{ | ||
name: "Poppins", | ||
}, | ||
{ | ||
name: "Didot", | ||
}, | ||
{ | ||
name: "Bodoni", | ||
}, | ||
{ | ||
name: "Baskerville", | ||
}, | ||
{ | ||
name: "Garamond", | ||
}, | ||
{ | ||
name: "Times New Roman", | ||
}, | ||
{ | ||
name: "New York", | ||
}, | ||
{ | ||
name: "Gabriela Stencil", | ||
}, | ||
{ | ||
name: "Minion", | ||
}, | ||
{ | ||
name: "Georgia", | ||
}, | ||
{ | ||
name: "Helvetica", | ||
}, | ||
{ | ||
name: "Futura", | ||
}, | ||
{ | ||
name: "Franklin Gothic", | ||
}, | ||
{ | ||
name: "Avenir", | ||
}, | ||
{ | ||
name: "Montserrat", | ||
}, | ||
{ | ||
name: "Frutiger", | ||
}, | ||
{ | ||
name: "News Gothic", | ||
}, | ||
{ | ||
name: "Gotham", | ||
}, | ||
{ | ||
name: "Gilroy", | ||
}, | ||
{ | ||
name: "Univers", | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const replaceSpacesToDash = (text: string) => { | ||
let newText = text.replace(/\s/g, "-"); | ||
|
||
return newText; | ||
}; |