remove styled-components

This commit is contained in:
Gabe Yuan
2023-09-06 15:12:17 +08:00
parent c7c5866131
commit 0b8f19bfad
4 changed files with 10815 additions and 15469 deletions

View File

@@ -16,7 +16,6 @@
"react-markdown": "^8.0.7", "react-markdown": "^8.0.7",
"react-router-dom": "^6.10.0", "react-router-dom": "^6.10.0",
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"styled-components": "^6.0.7",
"webextension-polyfill": "^0.10.0" "webextension-polyfill": "^0.10.0"
}, },
"scripts": { "scripts": {

View File

@@ -302,8 +302,8 @@ export const I18N = {
en: `Custom Style`, en: `Custom Style`,
}, },
diy_style_helper: { diy_style_helper: {
zh: `遵循“styled-components”的语法`, zh: `遵循“CSS”的语法`,
en: `Follow the syntax of "styled-components"`, en: `Follow the syntax of "CSS"`,
}, },
setting: { setting: {
zh: `设置`, zh: `设置`,

View File

@@ -13,9 +13,9 @@ import {
TRANS_NEWLINE_LENGTH, TRANS_NEWLINE_LENGTH,
} from "../../config"; } from "../../config";
import { useTranslate } from "../../hooks/Translate"; import { useTranslate } from "../../hooks/Translate";
import styled from "styled-components"; import { styled } from "@mui/material/styles";
const LineSpan = styled.span` const LineSpan = styled("span")`
opacity: 0.6; opacity: 0.6;
-webkit-opacity: 0.6; -webkit-opacity: 0.6;
text-decoration-line: underline; text-decoration-line: underline;
@@ -34,7 +34,7 @@ const LineSpan = styled.span`
} }
`; `;
const FuzzySpan = styled.span` const FuzzySpan = styled("span")`
filter: blur(0.2em); filter: blur(0.2em);
-webkit-filter: blur(0.2em); -webkit-filter: blur(0.2em);
&:hover { &:hover {
@@ -43,12 +43,12 @@ const FuzzySpan = styled.span`
} }
`; `;
const HighlightSpan = styled.span` const HighlightSpan = styled("span")`
color: #fff; color: #fff;
background-color: ${(props) => props.$bgColor}; background-color: ${(props) => props.$bgColor};
`; `;
const DiySpan = styled.span` const DiySpan = styled("span")`
${(props) => props.$diyStyle} ${(props) => props.$diyStyle}
`; `;

26269
yarn.lock

File diff suppressed because it is too large Load Diff