1
0
mirror of https://github.com/vercel/commerce.git synced 2025-08-09 02:11:24 +00:00
Files
.vscode
framework
packages
site
assets
components
auth
cart
checkout
common
Avatar
FeatureBar
FeatureBar.module.css
FeatureBar.tsx
index.ts
Footer
Head
HomeAllProductsGrid
I18nWidget
Layout
Navbar
Searchbar
SidebarLayout
UserNav
index.ts
icons
product
ui
wishlist
search.tsx
config
lib
pages
public
.env.template
.eslintrc
.gitignore
.prettierignore
.prettierrc
codegen.bigcommerce.json
codegen.json
commerce-config.js
commerce.config.json
global.d.ts
next-env.d.ts
next.config.js
package.json
postcss.config.js
swell-js.d.ts
tailwind.config.js
tsconfig.json
.editorconfig
.gitignore
.prettierignore
.prettierrc
README.md
license.md
package-copy.json
package-lock.json
package.json
commerce/site/components/common/FeatureBar/FeatureBar.tsx
2022-01-07 11:48:45 -05:00

40 lines
763 B
TypeScript

import cn from 'classnames'
import s from './FeatureBar.module.css'
interface FeatureBarProps {
className?: string
title: string
description?: string
hide?: boolean
action?: React.ReactNode
}
const FeatureBar: React.FC<FeatureBarProps> = ({
title,
description,
className,
action,
hide,
}) => {
const rootClassName = cn(
s.root,
{
transform: true,
'translate-y-0 opacity-100': !hide,
'translate-y-full opacity-0': hide,
},
className
)
return (
<div className={rootClassName}>
<span className="block md:inline">{title}</span>
<span className="block mb-6 md:inline md:mb-0 md:ml-2">
{description}
</span>
{action && action}
</div>
)
}
export default FeatureBar