Skip to content

Commit

Permalink
bug: make sure classname is merge with existing one
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Jan 8, 2025
1 parent 784a0d6 commit 7ab4de6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
12 changes: 8 additions & 4 deletions src/styles/customer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ import { tw } from './utils'

export const SectionHeader: FC<
PropsWithChildren<{ hideBottomShadow?: boolean } & TypographyProps>
> = ({ children, hideBottomShadow, ...props }) => (
> = ({ children, hideBottomShadow, className, ...props }) => (
<Typography
className={tw('flex h-18 items-center justify-between', {
'shadow-b': !hideBottomShadow,
})}
className={tw(
'flex h-18 items-center justify-between',
{
'shadow-b': !hideBottomShadow,
},
className,
)}
{...props}
>
{children}
Expand Down
17 changes: 13 additions & 4 deletions src/styles/mainObjectsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import styled from 'styled-components'
import { Skeleton, Typography, TypographyProps } from '~/components/designSystem'

import { NAV_HEIGHT, theme } from './muiTheme'
import { tw } from './utils'

export const MAIN_PADDING = theme.spacing(12)

Expand All @@ -33,14 +34,22 @@ export const Content = styled.div`
display: flex;
min-height: calc(100vh - ${NAV_HEIGHT}px);
`
export const Title: FC<PropsWithChildren<TypographyProps>> = ({ children, ...props }) => (
<Typography className="mb-1 px-8" {...props}>
export const Title: FC<PropsWithChildren<TypographyProps>> = ({
children,
className,
...props
}) => (
<Typography className={tw('mb-1 px-8', className)} {...props}>
{children}
</Typography>
)

export const Subtitle: FC<PropsWithChildren<TypographyProps>> = ({ children, ...props }) => (
<Typography className="mb-8 px-8" {...props}>
export const Subtitle: FC<PropsWithChildren<TypographyProps>> = ({
children,
className,
...props
}) => (
<Typography className={tw('mb-8 px-8', className)} {...props}>
{children}
</Typography>
)
Expand Down

0 comments on commit 7ab4de6

Please sign in to comment.