Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨(front) add wip status to product #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified src/assets/nuancier.webp
Binary file not shown.
10 changes: 8 additions & 2 deletions src/sections/Products.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ContentSection } from '@/components/ContentSection'
import Image from 'next/image'
import { Button } from '@/components/Button'
import { PRODUCTS } from '@/utils/products'
import classNames from 'classnames'

const PRODUCTS_GRID = [
'Tchap',
Expand All @@ -26,7 +27,10 @@ export const Products = () => {
const content = (
<div
key={name}
className="w-[120px] h-[120px] md:w-[150px] md:h-[150px] flex flex-col items-center justify-between bg-grey-6 rounded p-2 md:p-4"
className={classNames('w-[120px] h-[120px] md:w-[150px] md:h-[150px] flex flex-col items-center justify-between rounded p-2 md:p-4', {
'border-dashed border-2 border-grey-4': PRODUCTS[name].wip,
'bg-grey-6': !PRODUCTS[name].wip,
})}
>
<div className="flex-grow flex flex-col items-center justify-center relative">
<Image
Expand All @@ -35,7 +39,9 @@ export const Products = () => {
alt={`Logo ${name}`}
/>
{PRODUCTS[name]?.status && (
<div className="absolute bottom-0 md:right-[-15px] right-[-5px] text-sm bg-blue-1 border-2 border-white rounded text-white px-1 py-0.5 font-bold text-xs">
<div className={classNames("absolute bottom-0 md:right-[-15px] right-[-5px] text-sm bg-blue-1 border-2 border-white rounded text-white px-1 py-0.5 font-bold text-xs", {
'bg-grey-1': PRODUCTS[name].wip,
})}>
{PRODUCTS[name]?.status}
</div>
)}
Expand Down
4 changes: 3 additions & 1 deletion src/utils/products.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const PRODUCTS: Record<
items?: React.ReactNode[]
displayDetails?: boolean
status?: string
wip?: boolean
}
> = {
Tchap: {
Expand Down Expand Up @@ -196,7 +197,8 @@ export const PRODUCTS: Record<
'une boite mail et agenda open-source sécurisés pour les petites équipes',
description:
'Gérez vos emails et vos rendez-vous dans un environnement sécurisé conçu pour les besoins des agents du service public',
status: 'BETA',
status: 'Bientôt',
wip: true,
items: [
<>
<strong>Gérez votre boîte aux lettres</strong> avec une interface
Expand Down
Loading