Skip to content

Commit

Permalink
fix list className
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Jun 18, 2024
1 parent 270dd8c commit 00d4275
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/react/src/components/List/Lists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type ListUnorderedProps = {
} & Omit<HTMLAttributes<HTMLUListElement>, 'size'>;

export const Unordered = forwardRef<HTMLUListElement, ListUnorderedProps>(
({ asChild, ...rest }, ref) => {
({ asChild, className, ...rest }, ref) => {
const { size, headingId } = useContext(ListContext);

const Component = asChild ? Slot : 'ul';
Expand All @@ -27,7 +27,7 @@ export const Unordered = forwardRef<HTMLUListElement, ListUnorderedProps>(
asChild
>
<Component
className={cl(`ds-list`, `ds-list--${size}`, rest.className)}
className={cl(`ds-list`, `ds-list--${size}`, className)}
{...(headingId ? { 'aria-labelledby': headingId } : {})}
ref={ref}
{...rest}
Expand All @@ -48,7 +48,7 @@ export type ListOrderedProps = {
} & Omit<OlHTMLAttributes<HTMLOListElement>, 'size'>;

export const Ordered = forwardRef<HTMLOListElement, ListOrderedProps>(
({ asChild, ...rest }, ref) => {
({ asChild, className, ...rest }, ref) => {
const { size, headingId } = useContext(ListContext);

const Component = asChild ? Slot : 'ol';
Expand All @@ -59,7 +59,7 @@ export const Ordered = forwardRef<HTMLOListElement, ListOrderedProps>(
asChild
>
<Component
className={cl(`ds-list`, `ds-list--${size}`, rest.className)}
className={cl(`ds-list`, `ds-list--${size}`, className)}
{...(headingId ? { 'aria-labelledby': headingId } : {})}
ref={ref}
{...rest}
Expand Down
9 changes: 8 additions & 1 deletion packages/react/stories/bruk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import { CodeSnippet } from '@doc-components';

# Bruk

Introduksjon til bruk, regler og gotchas.
På denne sida finner du god informasjon om hvordan du kan bruke Designsystemet.
Under vil du finne:

- [React](#react)
- [Installasjon](#installasjon)
- [SSR](#ssr)
- [CSS](#css)
- [Layers](#layers)

## React

Expand Down

0 comments on commit 00d4275

Please sign in to comment.