Skip to content

Commit

Permalink
feat: add Circular font (#21)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Erichsen <[email protected]>
  • Loading branch information
Patrick-Erichsen authored Oct 30, 2021
1 parent 6f185cf commit 52803a7
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 25 deletions.
4 changes: 4 additions & 0 deletions src/content/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@font-face {
font-family: CircularStd;
src: url("../fonts/CircularStd-Medium.otf") format("opentype");
}
1 change: 1 addition & 0 deletions src/content/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useState } from 'react';
import { useUrlChangeChrome } from './hooks/useUrlChangeChrome';
import { OffiePortals } from './components/OffiePortals';
import { hasWifiOrWorkspaceFilter, isHomesSearchPage } from './utils';
import './App.css';

export const App = (): JSX.Element | null => {
const [isVisible, setIsVisible] = useState<boolean>(false);
Expand Down
12 changes: 9 additions & 3 deletions src/content/components/OffieButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,18 @@ export const OffieButton = ({
color="inherit"
variant="outlined"
onClick={handleClick}
sx={{
'& .MuiButton-startIcon': {
marginLeft: 0,
},
}}
style={{
// Custom Styles
textTransform: 'none',
fontWeight: 'bolder',
fontSize: 13,
fontFamily: 'CircularStd, Montserrat',
fontWeight: 'lighter',
// Airbnb styles
fontSize: 14,
height: 24,
padding: '3px 8px',
borderRadius: 4,
Expand All @@ -134,7 +140,7 @@ export const OffieButton = ({
outline: 0,
color: 'rgb(34, 34, 34)',
}}
startIcon={<WifiIcon />}
startIcon={<WifiIcon style={{ fontSize: 16 }} />}
>
{getButtonText(listingDetails.wifiSentiment)}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/content/utils/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export const waitForMapLoad = async (): Promise<void> => {
let curWaitMs = 250;

const waitIntervalMs = 250;
const maxWaitMs = 10000;
const maxWaitMs = 30000;

return new Promise((resolve, reject) => {
const interval = setInterval(async () => {
Expand Down
1 change: 1 addition & 0 deletions src/content/utils/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ declare module '@mui/material/styles' {
export const theme = createTheme({
typography: {
fontFamily: [
'CircularStd',
'Montserrat',
'BlinkMacSystemFont',
'"Segoe UI"',
Expand Down
Binary file added src/fonts/CircularStd-Medium.otf
Binary file not shown.
23 changes: 2 additions & 21 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@ module.exports = (env) => ({
module: {
rules: [
{
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
test: /\.(png|woff|woff2|eot|ttf|otf|svg)$/,
loader: 'url-loader',
},
{
test: /\.(js|jsx)$/,
use: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.css$/,
test: /\.(css|scss)$/,
use: ['style-loader', 'css-loader'],
exclude: /\.module\.css$/,
},
Expand All @@ -36,20 +31,6 @@ module.exports = (env) => ({
loader: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
importLoaders: 1,
modules: true,
},
},
],
include: /\.module\.css$/,
},
{
test: /\.svg$/,
use: 'file-loader',
Expand Down

0 comments on commit 52803a7

Please sign in to comment.