File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,9 +13,10 @@ interface AppSideBarProps {
1313}
1414
1515function 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 >
Original file line number Diff line number Diff line change 11import styled , { CSSObject } from "@emotion/styled" ;
22import { isLight } from "../../common/utils/colorUtils" ;
33import { darken , lighten } from "polished" ;
4+ import { CSSProperties } from "react" ;
45
56export 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
2123export const StyledButton = styled . button < StyledButtonProps > `
@@ -25,6 +27,7 @@ export const StyledButton = styled.button<StyledButtonProps>`
2527function 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 } ,
You can’t perform that action at this time.
0 commit comments