Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/link-list-card (added feedback points) #754

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/components-css/link-list-card/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.rhc-link-list__card {
.rhc-link-list-card {
background-color: var(--rhc-link-list-card-background-color);
display: flex;
flex-direction: column;
Expand Down
9 changes: 5 additions & 4 deletions packages/components-react/src/LinkListCard.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { forwardRef, HTMLAttributes } from 'react';
import clsx from 'clsx';
import { forwardRef, HTMLAttributes, ReactNode } from 'react';
import { Heading } from './Heading';
import { LinkList } from './LinkList';

export interface LinkListCardProps extends HTMLAttributes<HTMLDivElement> {
headingLevel: number;
heading: string;
heading: ReactNode;
}

export const LinkListCard = forwardRef<HTMLDivElement, LinkListCardProps>(
({ children, headingLevel, heading }, ref) => {
({ children, className, headingLevel, heading }, ref) => {
return (
<div className="rhc-link-list__card" ref={ref}>
<div className={clsx('rhc-link-list-card', className)} ref={ref}>
<Heading level={headingLevel}>{heading}</Heading>
<LinkList>{children}</LinkList>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/storybook/src/community/link-list-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

[NL design system](https://www.nldesignsystem.nl/alert/) | [Figma](https://www.figma.com/design/txFX5MGRf4O904dtIFcGTF/NLDS---Rijkshuisstijl---Bibliotheek?node-id=1195-4201&t=n1djYpmvDCKmAEUi-0) | [GitHub](https://github.com/nl-design-system/rijkshuisstijl-community/issues/472)

De **LinkListCard** component biedt een manier om een **card** weer te geven met een heading en een collectie van links. Dit component accepteert twee verschillende props: `headingLevel`, `headingText`
De **LinkListCard** component biedt een manier om een **card** weer te geven met een heading en een collectie van links. Dit component accepteert twee verschillende props: `headingLevel`, `heading`

- **`headingLevel`** (`number`)
Dit bepaalt het niveau van de heading, vergelijkbaar met HTML heading-tags

- **`headingText`** (`string`)
- **`heading`** (`string`)
De tekst die weergegeven wordt binnen de heading.

LinkListCard-component bestaat uit de volgende subcomponenten:
Expand Down