'use client' import classNames from 'classnames' type IChildrenProps = { children: React.ReactNode id?: string tag?: any label?: any anchor: boolean } type IHeaderingProps = { url: string method: 'PUT' | 'DELETE' | 'GET' | 'POST' title: string name: string } export const Heading = function H2({ url, method, title, name, }: IHeaderingProps) { let style = '' switch (method) { case 'PUT': style = 'ring-amber-300 bg-amber-400/10 text-amber-500 dark:ring-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400' break case 'DELETE': style = 'ring-rose-200 bg-rose-50 text-red-500 dark:ring-rose-500/20 dark:bg-rose-400/10 dark:text-rose-400' break case 'POST': style = 'ring-sky-300 bg-sky-400/10 text-sky-500 dark:ring-sky-400/30 dark:bg-sky-400/10 dark:text-sky-400' break default: style = 'ring-emerald-300 dark:ring-emerald-400/30 bg-emerald-400/10 text-emerald-500 dark:text-emerald-400' break } return ( <>
{name}
{name}