Skip to content

Commit

Permalink
fix: breadcrumb class override (#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
zougari47 authored Jul 13, 2024
1 parent 85e7d15 commit 79d3b31
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions apps/website/src/routes/docs/styled/breadcrumb/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ const Root = component$<BreadcrumbProps>(() => {
const List = component$<PropsOf<'ol'>>((props) => {
return (
<ol
{...props}
class={cn(
' flex flex-wrap items-center gap-1.5 break-words text-sm sm:gap-2.5',
props.class,
)}
{...props}
>
<Slot />
</ol>
Expand All @@ -50,7 +50,7 @@ const List = component$<PropsOf<'ol'>>((props) => {

const Item = component$<PropsOf<'li'>>((props) => {
return (
<li class={cn('inline-flex items-center gap-1.5', props.class)} {...props}>
<li {...props} class={cn('inline-flex items-center gap-1.5', props.class)}>
<Slot />
</li>
);
Expand All @@ -60,11 +60,11 @@ const Link = component$<PropsOf<'a'> & { asChild?: boolean }>((props) => {
const Comp = props.asChild ? Slot : 'a';
return (
<Comp
{...props}
class={cn(
'text-muted-foreground transition-colors hover:text-foreground',
props.class,
)}
{...props}
>
{!props.asChild && <Slot />}
</Comp>
Expand All @@ -85,8 +85,8 @@ const Page = component$<PropsOf<'span'>>((props) => {
role="link"
aria-disabled="true"
aria-current="page"
class={cn('font-normal text-foreground', props.class)}
{...props}
class={cn('font-normal text-foreground', props.class)}
>
<Slot />
</span>
Expand Down
8 changes: 4 additions & 4 deletions packages/kit-styled/src/components/breadcrumb/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ const Root = component$<BreadcrumbProps>(() => {
const List = component$<PropsOf<'ol'>>((props) => {
return (
<ol
{...props}
class={cn(
' flex flex-wrap items-center gap-1.5 break-words text-sm sm:gap-2.5',
props.class,
)}
{...props}
>
<Slot />
</ol>
Expand All @@ -27,7 +27,7 @@ const List = component$<PropsOf<'ol'>>((props) => {

const Item = component$<PropsOf<'li'>>((props) => {
return (
<li class={cn('inline-flex items-center gap-1.5', props.class)} {...props}>
<li {...props} class={cn('inline-flex items-center gap-1.5', props.class)}>
<Slot />
</li>
);
Expand All @@ -37,11 +37,11 @@ const Link = component$<PropsOf<'a'> & { asChild?: boolean }>((props) => {
const Comp = props.asChild ? Slot : 'a';
return (
<Comp
{...props}
class={cn(
'text-muted-foreground transition-colors hover:text-foreground',
props.class,
)}
{...props}
>
{!props.asChild && <Slot />}
</Comp>
Expand All @@ -62,8 +62,8 @@ const Page = component$<PropsOf<'span'>>((props) => {
role="link"
aria-disabled="true"
aria-current="page"
class={cn('font-normal text-foreground', props.class)}
{...props}
class={cn('font-normal text-foreground', props.class)}
>
<Slot />
</span>
Expand Down

0 comments on commit 79d3b31

Please sign in to comment.