-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bundle svg files to prevent image flicker
- Loading branch information
1 parent
375e27f
commit 06a46de
Showing
7 changed files
with
459 additions
and
29 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 |
---|---|---|
@@ -1,27 +1,18 @@ | ||
import styled from "@emotion/styled"; | ||
import MicMute from "./mic_off.svg"; | ||
import MicUnmute from "./mic_on.svg"; | ||
import Arrow from "./arrow_back.svg"; | ||
import RemoveSvg from "./clear.svg"; | ||
import VolumeOn from "./volume_on.svg"; | ||
import VolumeOff from "./volume_off.svg"; | ||
import MicMute from "./mic_off.svg?react"; | ||
import MicUnmute from "./mic_on.svg?react"; | ||
import Arrow from "./arrow_back.svg?react"; | ||
import RemoveSvg from "./clear.svg?react"; | ||
import VolumeOn from "./volume_on.svg?react"; | ||
import VolumeOff from "./volume_off.svg?react"; | ||
|
||
const Icon = styled.img` | ||
width: 100%; | ||
height: auto; | ||
display: block; | ||
`; | ||
export const MicMuted = () => <MicMute />; | ||
|
||
export const MicMuted = () => <Icon src={MicMute} alt="off-microphone" />; | ||
export const MicUnmuted = () => <MicUnmute />; | ||
|
||
export const MicUnmuted = () => <Icon src={MicUnmute} alt="on-microphone" />; | ||
export const BackArrow = () => <Arrow />; | ||
|
||
export const BackArrow = () => <Icon src={Arrow} alt="arrow-left" />; | ||
export const RemoveIcon = () => <RemoveSvg />; | ||
|
||
export const RemoveIcon = () => <Icon src={RemoveSvg} alt="cross" />; | ||
export const SpeakerOff = () => <VolumeOff />; | ||
|
||
export const SpeakerOff = () => ( | ||
<Icon src={VolumeOff} alt="speaker-crossed-over" /> | ||
); | ||
|
||
export const SpeakerOn = () => <Icon src={VolumeOn} alt="speaker" />; | ||
export const SpeakerOn = () => <VolumeOn />; |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
/// <reference types="vite/client" /> | ||
/// <reference types="vite-plugin-svgr/client" /> |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { defineConfig } from "vite"; | ||
import react from "@vitejs/plugin-react-swc"; | ||
import svgr from "vite-plugin-svgr"; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
plugins: [react(), svgr()], | ||
}); |
Oops, something went wrong.