mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 03:32:36 +08:00
chore: fix search-box bg
This commit is contained in:
parent
da98097394
commit
ae6f42a7fb
|
@ -35,7 +35,6 @@ export const BaseSearchBox = styled((props: SearchProps) => {
|
||||||
} as React.CSSProperties,
|
} as React.CSSProperties,
|
||||||
inheritViewBox: true,
|
inheritViewBox: true,
|
||||||
};
|
};
|
||||||
const active = "var(--primary-main)";
|
|
||||||
|
|
||||||
const onChange = (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
const onChange = (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
||||||
props.onSearch(
|
props.onSearch(
|
||||||
|
@ -99,7 +98,7 @@ export const BaseSearchBox = styled((props: SearchProps) => {
|
||||||
<SvgIcon
|
<SvgIcon
|
||||||
component={matchCaseIcon}
|
component={matchCaseIcon}
|
||||||
{...iconStyle}
|
{...iconStyle}
|
||||||
sx={{ fill: matchCase ? active : undefined }}
|
aria-label={matchCase ? "active" : "inactive"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setMatchCase(!matchCase);
|
setMatchCase(!matchCase);
|
||||||
}}
|
}}
|
||||||
|
@ -111,7 +110,7 @@ export const BaseSearchBox = styled((props: SearchProps) => {
|
||||||
<SvgIcon
|
<SvgIcon
|
||||||
component={matchWholeWordIcon}
|
component={matchWholeWordIcon}
|
||||||
{...iconStyle}
|
{...iconStyle}
|
||||||
sx={{ fill: matchWholeWord ? active : undefined }}
|
aria-label={matchWholeWord ? "active" : "inactive"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setMatchWholeWord(!matchWholeWord);
|
setMatchWholeWord(!matchWholeWord);
|
||||||
}}
|
}}
|
||||||
|
@ -122,7 +121,7 @@ export const BaseSearchBox = styled((props: SearchProps) => {
|
||||||
<div>
|
<div>
|
||||||
<SvgIcon
|
<SvgIcon
|
||||||
component={useRegularExpressionIcon}
|
component={useRegularExpressionIcon}
|
||||||
sx={{ fill: useRegularExpression ? active : undefined }}
|
aria-label={useRegularExpression ? "active" : "inactive"}
|
||||||
{...iconStyle}
|
{...iconStyle}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setUseRegularExpression(!useRegularExpression);
|
setUseRegularExpression(!useRegularExpression);
|
||||||
|
@ -133,11 +132,19 @@ export const BaseSearchBox = styled((props: SearchProps) => {
|
||||||
</Box>
|
</Box>
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
|
{...props}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
})(({ theme }) => ({
|
})(({ theme }) => ({
|
||||||
"& .MuiInputBase-root": {
|
"& .MuiInputBase-root": {
|
||||||
background: theme.palette.mode === "light" ? "#fff" : undefined,
|
background: theme.palette.mode === "light" ? "#fff" : undefined,
|
||||||
|
"padding-right": "4px",
|
||||||
|
},
|
||||||
|
"& .MuiInputBase-root svg[aria-label='active'] path": {
|
||||||
|
fill: theme.palette.primary.light,
|
||||||
|
},
|
||||||
|
"& .MuiInputBase-root svg[aria-label='inactive'] path": {
|
||||||
|
fill: "#A7A7A7",
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user