mirror of
https://github.com/vercel/commerce.git
synced 2025-08-13 20:31:23 +00:00
.vscode
assets
components
auth
cart
common
icons
product
ui
Button
Container
Grid
Hero
Input
Link
LoadingDots
Logo
Marquee
Marquee.module.css
Marquee.tsx
index.ts
Modal
Sidebar
Skeleton
Text
README.md
context.tsx
index.ts
wishlist
config
framework
lib
pages
public
.editorconfig
.env.template
.gitignore
.prettierignore
.prettierrc
README.md
codegen.bigcommerce.json
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
* Remove duplicated css rules. (#185) * Fix typo in the Marquee component (#176) Co-authored-by: Hugo Lopes <hugo.lopes@present-technologies.com> * Remove duplicated css rules. Fix invalid JSX props. Co-authored-by: Hugo Lopes <hugo.lopes@present-technologies.com> * Fix the body scroll when the sidebar is open (#184) * Fix typo in the Marquee component (#176) Co-authored-by: Hugo Lopes <hugo.lopes@present-technologies.com> * Fix the body scroll when the sidebar is open Co-authored-by: Hugo Lopes <hugo.lopes@present-technologies.com> * Remove duplicate class in the I18nWidget comp (#183) * Fix typo in the Marquee component (#176) Co-authored-by: Hugo Lopes <hugo.lopes@present-technologies.com> * Remove duplicate class name in the I18nWidget comp This PR removes a duplicate class name in the I18nWidget component. Co-authored-by: Hugo Lopes <hugo.rodrigues.lopes@gmail.com> Co-authored-by: Hugo Lopes <hugo.lopes@present-technologies.com> * add horizontal margin to pages when mobile screen (#180) * Add cart item options like color and size (#177) Co-authored-by: hlopes <hugo.lopes@present-technologies.com> * Changes Co-authored-by: Hugo Lopes <hugo.rodrigues.lopes@gmail.com> Co-authored-by: Hugo Lopes <hugo.lopes@present-technologies.com> Co-authored-by: Jamie Isaksen <jamie@jamie.no> Co-authored-by: Vinicius Zucatti <51221635+vczb@users.noreply.github.com>
36 lines
718 B
TypeScript
36 lines
718 B
TypeScript
import cn from 'classnames'
|
|
import s from './Marquee.module.css'
|
|
import { FC, ReactNode, Component } from 'react'
|
|
import Ticker from 'react-ticker'
|
|
|
|
interface Props {
|
|
className?: string
|
|
children?: ReactNode[] | Component[] | any[]
|
|
variant?: 'primary' | 'secondary'
|
|
}
|
|
|
|
const Marquee: FC<Props> = ({
|
|
className = '',
|
|
children,
|
|
variant = 'primary',
|
|
}) => {
|
|
const rootClassName = cn(
|
|
s.root,
|
|
{
|
|
[s.primary]: variant === 'primary',
|
|
[s.secondary]: variant === 'secondary',
|
|
},
|
|
className
|
|
)
|
|
|
|
return (
|
|
<div className={rootClassName}>
|
|
<Ticker offset={80}>
|
|
{() => <div className={s.container}>{children}</div>}
|
|
</Ticker>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Marquee
|