diff --git a/apps/www/src/content/docs/components/indicator/props.ts b/apps/www/src/content/docs/components/indicator/props.ts index c2cd153a6..df0df7d98 100644 --- a/apps/www/src/content/docs/components/indicator/props.ts +++ b/apps/www/src/content/docs/components/indicator/props.ts @@ -16,4 +16,10 @@ export interface IndicatorProps { /** Additional CSS class names */ className?: string; + + /** Map of classNames for internal components */ + classNames?: { + /** Class for the outer container element */ + container?: string; + }; } diff --git a/packages/raystack/components/indicator/indicator.tsx b/packages/raystack/components/indicator/indicator.tsx index d78f82688..5c2bf6195 100644 --- a/packages/raystack/components/indicator/indicator.tsx +++ b/packages/raystack/components/indicator/indicator.tsx @@ -1,4 +1,4 @@ -import { cva, VariantProps } from 'class-variance-authority'; +import { cva, cx, VariantProps } from 'class-variance-authority'; import { ComponentProps, ReactNode } from 'react'; import styles from './indicator.module.css'; @@ -24,10 +24,14 @@ export interface IndicatorProps label?: string; children?: ReactNode; 'aria-label'?: string; + classNames?: { + container?: string; + }; } export const Indicator = ({ className, + classNames, variant, label, children, @@ -37,7 +41,7 @@ export const Indicator = ({ const accessibilityLabel = ariaLabel || label || `${variant} indicator`; return ( -