Skip to content

Commit 47609b2

Browse files
committed
tweaks
1 parent 3147f6f commit 47609b2

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/components/AppSideBar/AppSideBar.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ interface AppSideBarProps {
1313
}
1414

1515
function AppSideBar({ items }: AppSideBarProps) {
16-
const [buttonFontColor, buttonColor] = useSystemSettings((s) => [
16+
const [fontColor, buttonColor] = useSystemSettings((s) => [
1717
s.fontColor,
1818
s.mainColor,
19+
s.secondaryColor,
1920
]);
2021
return (
2122
<StyledSideBar>
@@ -25,9 +26,11 @@ function AppSideBar({ items }: AppSideBarProps) {
2526
padding={"6px 10px"}
2627
group="vertical"
2728
onClick={item.onClick}
28-
color={buttonFontColor}
29+
color={fontColor}
2930
backgroundColor={buttonColor}
3031
active={item.isActive ?? false}
32+
justifyContent="start"
33+
key={item.title}
3134
>
3235
{item.title}
3336
</Button>

src/components/Button/styles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import styled, { CSSObject } from "@emotion/styled";
22
import { isLight } from "../../common/utils/colorUtils";
33
import { darken, lighten } from "polished";
4+
import { CSSProperties } from "react";
45

56
export interface StyledButtonProps {
67
width?: string | number;
@@ -16,6 +17,7 @@ export interface StyledButtonProps {
1617
borderRadius?: number;
1718
group?: "horizontal" | "vertical";
1819
padding?: CSSObject["padding"];
20+
justifyContent?: CSSProperties["justifyContent"];
1921
}
2022

2123
export const StyledButton = styled.button<StyledButtonProps>`
@@ -25,6 +27,7 @@ export const StyledButton = styled.button<StyledButtonProps>`
2527
function buildStyledButton({
2628
width = "100%",
2729
borderRadius = 6,
30+
justifyContent = "center",
2831
...props
2932
}: StyledButtonProps): CSSObject {
3033
return {
@@ -40,6 +43,9 @@ function buildStyledButton({
4043
backgroundColor: props.active
4144
? getBackgroundColorActive(props)
4245
: props.backgroundColor,
46+
display: "flex",
47+
justifyContent,
48+
alignItems: "center",
4349
":hover": {
4450
backgroundColor: getBackgroundColorHover(props),
4551
},

0 commit comments

Comments
 (0)