import React from 'react'
/** storefront-style section card: header strip with icon tile, title, subtitle and optional badge. */
export function SettingsCard({ icon: Icon, iconClass = 'bg-slate-100 text-slate-700', title, subtitle, badge, right, children, bodyClass = 'p-5 space-y-5', ...rest }) {
return (
{Icon && (
)}
{title}
{subtitle &&
{subtitle}
}
{badge && (
{badge}
)}
{right}
{children &&
{children}
}
)
}
/** Accessible on/off switch (the reference builder ). */
export function Switch({ checked, onChange, label, size = 'md', id }) {
const dims = size === 'sm'
? 'w-9 h-5 after:h-4 after:w-4'
: 'w-11 h-6 after:h-5 after:w-5'
return (
)
}
export const fieldInputCls = 'w-full px-3 py-2 bg-gray-50/50 border border-gray-200 rounded-lg text-sm transition-colors focus:bg-white focus:outline-none focus:ring-2 focus:ring-gray-900 focus:border-transparent'
export const fieldLabelCls = 'block text-sm font-medium text-gray-700 mb-1.5'