-
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.
Merge pull request #15 from xwcoder/feature/fontsize
feat(reader): add increase font and decrease font function
- Loading branch information
Showing
8 changed files
with
84 additions
and
6 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
17 changes: 17 additions & 0 deletions
17
src/ui/apps/reader/MainPanel/Article/Toolbar/font-decrease-button.tsx
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,17 @@ | ||
import intl from 'react-intl-universal' | ||
import { FontDecreaseRegular } from '@fluentui/react-icons' | ||
import { Button } from '@/ui/apps/reader/components/toolbar' | ||
import { store } from '@/ui/store' | ||
|
||
const { readerStore } = store | ||
|
||
export default function FontDecreaseButton() { | ||
return ( | ||
<Button | ||
icon={FontDecreaseRegular} | ||
onClick={() => readerStore.decreaseFont()} | ||
fontSize={20} | ||
tip={intl.get('reader.action.fontDecrease')} | ||
/> | ||
) | ||
} |
17 changes: 17 additions & 0 deletions
17
src/ui/apps/reader/MainPanel/Article/Toolbar/font-increase-button.tsx
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,17 @@ | ||
import intl from 'react-intl-universal' | ||
import { FontIncreaseRegular } from '@fluentui/react-icons' | ||
import { Button } from '@/ui/apps/reader/components/toolbar' | ||
import { store } from '@/ui/store' | ||
|
||
const { readerStore } = store | ||
|
||
export default function FontIncreaseButton() { | ||
return ( | ||
<Button | ||
icon={FontIncreaseRegular} | ||
onClick={() => readerStore.increaseFont()} | ||
fontSize={20} | ||
tip={intl.get('reader.action.fontIncrease')} | ||
/> | ||
) | ||
} |
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