el.xwx.moe/components/InputSelect/styles.ts

62 lines
1.4 KiB
TypeScript
Raw Normal View History

import { StylesConfig } from "react-select";
const font =
"ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji";
export const styles: StylesConfig = {
option: (styles, state) => ({
...styles,
fontFamily: font,
cursor: "pointer",
backgroundColor: state.isSelected ? "#0ea5e9" : "inherit",
"&:hover": {
2023-05-28 17:06:49 -05:00
backgroundColor: state.isSelected ? "#0ea5e9" : "#e2e8f0",
},
transition: "all 50ms",
}),
control: (styles) => ({
...styles,
fontFamily: font,
border: "none",
}),
container: (styles) => ({
...styles,
border: "1px solid #e0f2fe",
2023-03-25 09:17:34 -05:00
borderRadius: "0.375rem",
lineHeight: "1.25rem",
2023-05-01 15:00:23 -05:00
// "@media screen and (min-width: 1024px)": {
// fontSize: "0.875rem",
// },
}),
input: (styles) => ({
...styles,
cursor: "text",
}),
dropdownIndicator: (styles) => ({
...styles,
cursor: "pointer",
}),
placeholder: (styles) => ({
...styles,
borderColor: "black",
}),
multiValue: (styles) => {
return {
...styles,
backgroundColor: "#0ea5e9",
color: "white",
};
},
multiValueLabel: (styles) => ({
...styles,
color: "white",
}),
multiValueRemove: (styles) => ({
...styles,
":hover": {
color: "white",
backgroundColor: "#38bdf8",
},
}),
};