Skip to Content
BBRICKSv0.7.4
Screens

Commissions and product details

Row details in a DetailsDrawer: a commission order over Payments › Commissions, and a best-selling product over Analytics.

Row details in a DetailsDrawer: a commission order over Payments › Commissions, and a best-selling product over Analytics. Composed in BrandSubScreens.tsx and AnalyticsScreen.tsx (its drawer prop) from BRICKS exports only, with the v3 brand mock's numbers.

Payments › Commissions with an order open

The commission StackBar, the orders table and the order in a DetailsDrawer.

Pinned to TRNDR preset
Code
import type { Lang } from '@ergasti/bricks';
import { useLanguage } from '@ergasti/bricks';
import { BRAND_SUB_SCREENS } from '../../../packages/bricks/src/gallery/screens/BrandSubScreens';

const view = (id: string, language: Lang) => {
  const { Screen } = BRAND_SUB_SCREENS[id];
  return <Screen language={language} />;
};

function CommissionOrder() { return view('commission-order', useLanguage()); }

Analytics with a product open

The product in a DetailsDrawer: sold, sales, trend, average price and its top creators.

Pinned to TRNDR preset
Code
import type { Lang } from '@ergasti/bricks';
import { useLanguage } from '@ergasti/bricks';
import { BRAND_SUB_SCREENS } from '../../../packages/bricks/src/gallery/screens/BrandSubScreens';

const view = (id: string, language: Lang) => {
  const { Screen } = BRAND_SUB_SCREENS[id];
  return <Screen language={language} />;
};

function ProductDrawer() { return view('analytics-product', useLanguage()); }

How it is built

  • Both drawers are a DetailsDrawer with a DrawerHead at the top.
  • Commission order (Payments › Commissions): the page has a Card with StackBar (pending / approved / paid) and the orders DataTable. The drawer's sections are the order's rows, the creator as RowItems (valueTone="muted") and a StepTimeline of where the money is.
  • Product (Analytics, drawer="product"): DrawerHead with a ProductThumb lead, four rows (sold, sales, Delta trend, average price) and the top sellers as RowItems.
  • DetailsDrawer is deprecated since 0.5.0 and keeps working until 1.0. New drawers compose Drawer + DrawerHead + KeyValue + RowItems, as the gift drawers on Gifts do.