-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update stepper storybook example and extend div props on MdStep (#197)
* Update stepper storybook example and extend div props on MdStep * avoid passing completedCOntent to the dom element * undo changes ti stepper.css
- Loading branch information
1 parent
aa8e5f1
commit eb50eec
Showing
2 changed files
with
49 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import React from 'react'; | ||
|
||
export interface MdStepProps { | ||
export interface MdStepProps extends React.HTMLAttributes<HTMLDivElement> { | ||
title: string; | ||
children: React.ReactNode; | ||
completedContent?: React.ReactNode; | ||
} | ||
|
||
const MdStep: React.FunctionComponent<MdStepProps> = ({ children }: MdStepProps) => { | ||
return <div>{children}</div>; | ||
const MdStep: React.FunctionComponent<MdStepProps> = ({ children, ...otherProps }: MdStepProps) => { | ||
// Destructure the title and completedContent props from the otherProps object | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const { title, completedContent, ...rest } = otherProps; | ||
|
||
return <div {...rest}>{children}</div>; | ||
}; | ||
|
||
export default MdStep; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters