Skip to content

Commit

Permalink
fix: Change color of New chip in sidebar (#4332)
Browse files Browse the repository at this point in the history
* fix: Change color of New chip in sidebar
  • Loading branch information
usame-algan authored Oct 9, 2024
1 parent cb6026b commit 9d6cf75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/components/common/Chip/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { Typography, Chip as MuiChip } from '@mui/material'
import { Typography, Chip as MuiChip, type ChipProps } from '@mui/material'

type ChipProps = {
type Props = {
label?: string
color?: 'primary' | 'secondary' | 'info' | 'warning' | 'success' | 'error'
sx?: ChipProps['sx']
}

export function Chip({ color = 'primary', label = 'New' }: ChipProps) {
export function Chip({ sx, label = 'New' }: Props) {
return (
<MuiChip
size="small"
component="span"
sx={{
backgroundColor: `${color}.background`,
color: `${color}.light`,
...sx,
mt: '-2px',
}}
label={
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/SidebarNavigation/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const navItems: NavItem[] = [
label: 'Stake',
icon: <SvgIcon component={StakeIcon} inheritViewBox />,
href: AppRoutes.stake,
tag: <Chip label="New" />,
tag: <Chip label="New" sx={{ backgroundColor: 'secondary.light', color: 'static.main' }} />,
},
{
label: 'Transactions',
Expand Down

0 comments on commit 9d6cf75

Please sign in to comment.