2023-02-09 12:59:10 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { css, Global } from '@emotion/react';
|
2023-07-20 19:27:33 +08:00
|
|
|
import { useTheme } from 'antd-style';
|
2023-02-09 12:59:10 +08:00
|
|
|
|
|
|
|
const THEME_PREFIX = 'dumi-default-';
|
|
|
|
|
|
|
|
export default () => {
|
2023-07-20 19:27:33 +08:00
|
|
|
const token = useTheme();
|
2023-02-09 12:59:10 +08:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Global
|
|
|
|
styles={css`
|
|
|
|
html {
|
|
|
|
.${THEME_PREFIX}search-bar {
|
|
|
|
&-input {
|
|
|
|
color: ${token.colorText};
|
|
|
|
background: ${token.colorBgContainer};
|
|
|
|
&:focus {
|
|
|
|
background: ${token.colorBgContainer};
|
|
|
|
}
|
|
|
|
&::placeholder {
|
|
|
|
color: ${token.colorTextPlaceholder} !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.${THEME_PREFIX}search-popover {
|
|
|
|
background-color: ${token.colorBgElevated} !important;
|
|
|
|
&::before {
|
|
|
|
border-bottom-color: ${token.colorBgElevated} !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.${THEME_PREFIX}search-result {
|
|
|
|
dl {
|
|
|
|
dt {
|
|
|
|
background-color: ${token.controlItemBgActive} !important;
|
|
|
|
}
|
|
|
|
dd {
|
|
|
|
a {
|
|
|
|
&:hover {
|
|
|
|
background-color: ${token.controlItemBgHover};
|
|
|
|
h4,
|
|
|
|
p {
|
|
|
|
color: ${token.colorText} !important;
|
|
|
|
}
|
|
|
|
svg {
|
|
|
|
fill: ${token.colorText} !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|