Skip to content

Commit

Permalink
feat: pass native props like ID to Collapse node
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaoste committed Jan 11, 2022
1 parent 6817c06 commit 4dcd271
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/components/collapse/src/Collapse.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useLayoutEffect, useRef } from 'react';
import tokens from '@contentful/f36-tokens';
import type { CommonProps } from '@contentful/f36-core';
import type { CommonProps, PropsWithHTMLElement } from '@contentful/f36-core';
import { Box } from '@contentful/f36-core';
import { getCollapseStyles } from './Collapse.styles';

export interface CollapseProps extends CommonProps {
interface CollapseInternalProps extends CommonProps {
/**
* Child nodes to be rendered in the component
*/
Expand All @@ -19,6 +19,11 @@ export interface CollapseProps extends CommonProps {
className?: string;
}

export type CollapseProps = PropsWithHTMLElement<
CollapseInternalProps,
'div'
>;

export const Collapse = ({
children,
className,
Expand Down

0 comments on commit 4dcd271

Please sign in to comment.