Skip to content

Commit

Permalink
Drop heading alltogether
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Dec 10, 2024
1 parent 0bffc6a commit 6bc9a51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/ndla-ui/src/FileList/FileList.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const DifferentFiles: StoryObj<typeof File> = {
),
};

export const NoHeader: StoryObj<typeof File> = {
export const JustTheFileItems: StoryObj<typeof File> = {
render: () => (
<ul>
<FileListItem>
Expand All @@ -109,7 +109,7 @@ export const NoHeader: StoryObj<typeof File> = {
),
};

export const FilesWithButtons: StoryObj<typeof File> = {
export const FileItemsWithButtons: StoryObj<typeof File> = {
render: () => (
<ul>
<FileListItem>
Expand Down
6 changes: 0 additions & 6 deletions packages/ndla-ui/src/FileList/FileList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
*/

import { ComponentPropsWithoutRef } from "react";
import { useTranslation } from "react-i18next";
import { ark } from "@ark-ui/react";
import { Heading } from "@ndla/primitives";
import { styled } from "@ndla/styled-system/jsx";

interface Props extends ComponentPropsWithoutRef<"div"> {}
Expand Down Expand Up @@ -42,12 +40,8 @@ export const FileListItem = styled(
);

export const FileListEmbed = ({ children, ...rest }: Props) => {
const { t } = useTranslation();
return (
<FileListWrapper {...rest} data-embed-type="file-list">
<Heading fontWeight="bold" textStyle="heading.small" asChild consumeCss>
<h2>{t("files")}</h2>
</Heading>
<ul>{children}</ul>
</FileListWrapper>
);
Expand Down

0 comments on commit 6bc9a51

Please sign in to comment.