Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

feat(fontFamily) Add fontFamily as a preference #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 11 additions & 1 deletion src/containers/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,15 @@ class App extends Component {
getLastMessage,
enableHistoryInput,
} = this.props
const { expanded } = this.state
const { expanded } = this.state;

const fontFamilyRule = `
.RecastApp *,
.RecastApp *:after,
.RecastApp *:before {
font-family: ${preferences.fontFamily}
}
`;

return (
<div className="RecastApp">
Expand All @@ -148,6 +156,8 @@ class App extends Component {
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css"
/>

{preferences.fontFamily && (<style>{fontFamilyRule}</style>)}

<Expander
show={!expanded}
onClick={this.toggleChat}
Expand Down