Skip to content

Commit

Permalink
style(components): 修改组件UI样式
Browse files Browse the repository at this point in the history
  • Loading branch information
kaze-k committed Jul 30, 2024
1 parent e7c4441 commit b52efcb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Layout/Contents/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const CLASSNAMES: CSSTransitionClassNames = {

// 过渡动画
const KEYFRAMES: Keyframe[] = [
{ transform: "translateY(150px)", opacity: 0.5 },
{ transform: "translateY(120px)", opacity: 0.5 },
{ transform: "translateY(0)", opacity: 1 },
]

Expand Down
3 changes: 2 additions & 1 deletion src/components/TypeSelector/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ const SelectButton: StyledComponent<"div", SelectButtonProps, SelectButtonProps,
*/
const SelectItem: StyledComponent<"li", SelectItemProps, SelectItemProps, never> = styled.li<SelectItemProps>(
(props: SelectItemProps): CSSProp => ({
color: props.hover && "var(--select-item-hover-color)",
color: props.hover && "var(--select-item-selected-color)",
pointerEvents: props.hover ? "none" : "auto",
}),
)

Expand Down
7 changes: 6 additions & 1 deletion src/components/TypeSelector/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
width: 100%;
list-style: none;
cursor: pointer;
transition: all 0.3s ease-in-out;

&:hover {
color: var(--select-item-hover-color);
}
}

.select-item-text {
Expand All @@ -58,5 +63,5 @@
top: 0;
border-radius: 10px;
transition: transform 0.3s ease-in-out;
background-color: var(--select-item-hover-bg-color);
background-color: var(--select-item-selected-bg-color);
}
5 changes: 3 additions & 2 deletions src/styles/theme/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
--input-caret-color: #ffffff;
--input-border: 1px solid #343a43;
--input-hover-border: 1px solid rgb(52 58 67 / 50%);
--select-item-hover-color: #fb7299;
--select-item-hover-bg-color: rgb(0 0 0 / 50%);
--select-item-hover-color: #fba1a8;
--select-item-selected-color: #fb7299;
--select-item-selected-bg-color: rgb(0 0 0 / 50%);
--select-button-color: #ffffff;
--select-button-selected-color: #343a43;
--select-button-selected-bg-color: #ffffff;
Expand Down
5 changes: 3 additions & 2 deletions src/styles/theme/light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
--input-caret-color: #fb7299;
--input-border: 1px solid #fb7299;
--input-hover-border: 1px solid rgb(251 114 153 / 50%);
--select-item-hover-color: #fb7299;
--select-item-hover-bg-color: rgb(235 235 235 / 50%);
--select-item-hover-color: #fba1a8;
--select-item-selected-color: #fb7299;
--select-item-selected-bg-color: rgb(235 235 235 / 50%);
--select-button-color: #ffffff;
--select-button-selected-color: #fb7299;
--select-button-selected-bg-color: #ffffff;
Expand Down

0 comments on commit b52efcb

Please sign in to comment.