-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
74 additions
and
43 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
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
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
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
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
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
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
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,18 +1,26 @@ | ||
import { FC, PropsWithChildren } from 'react'; | ||
import { FC, HTMLAttributes } from 'react'; | ||
|
||
import * as style from './index.module.less'; | ||
|
||
export type VerticalMarqueeProps = PropsWithChildren<{ duration?: string }>; | ||
export interface VerticalMarqueeProps extends HTMLAttributes<HTMLDivElement> { | ||
duration?: string; | ||
} | ||
|
||
export const VerticalMarquee: FC<VerticalMarqueeProps> = ({ | ||
className = '', | ||
children, | ||
duration | ||
duration, | ||
...props | ||
}) => ( | ||
<div | ||
className={`d-inline-block mh-100 ${style.scrollWrap}`} | ||
// @ts-expect-error remove after React 19 released | ||
style={{ '--duration': duration }} | ||
> | ||
<div className={`d-inline-block ${style.scrollItem}`}>{children}</div> | ||
<div className={`overflow-hidden ${className}`} {...props}> | ||
<div | ||
className={`d-inline-block mw-100 mh-100 ${style.scrollWrap}`} | ||
// @ts-expect-error remove after React 19 released | ||
style={{ '--duration': duration }} | ||
> | ||
<div className={`d-inline-block ${style.scrollItem}`}> | ||
{children} | ||
</div> | ||
</div> | ||
</div> | ||
); |
41ccd88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for idea-react ready!
✅ Preview
https://idea-react-prpryyd1y-stevending1sts-projects.vercel.app
Built with commit 41ccd88.
This pull request is being automatically deployed with vercel-action