Skip to content
Merged
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
6 changes: 6 additions & 0 deletions apps/www/src/content/docs/components/indicator/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ export interface IndicatorProps {

/** Additional CSS class names */
className?: string;

/** Map of classNames for internal components */
classNames?: {
Comment thread
rohanchkrabrty marked this conversation as resolved.
/** Class for the outer container element */
container?: string;
};
Comment thread
rohanchkrabrty marked this conversation as resolved.
}
8 changes: 6 additions & 2 deletions packages/raystack/components/indicator/indicator.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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,
Expand All @@ -37,7 +41,7 @@ export const Indicator = ({
const accessibilityLabel = ariaLabel || label || `${variant} indicator`;

return (
<div className={styles.wrapper} {...props}>
<div className={cx(styles.wrapper, classNames?.container)} {...props}>
{children}
<div
className={indicator({ variant, className })}
Expand Down
10 changes: 5 additions & 5 deletions packages/raystack/components/sidebar/sidebar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
width: 220px;
height: 100%;
padding: var(--rs-space-5) var(--rs-space-4);
padding: var(--rs-space-5) 0;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
Expand Down Expand Up @@ -42,18 +42,17 @@

.header {
gap: var(--rs-space-3);
padding: var(--rs-space-2);
padding: var(--rs-space-2) var(--rs-space-5) var(--rs-space-7);
align-self: stretch;
border-radius: var(--rs-radius-2);
background: var(--rs-color-background-base-primary);
overflow: hidden;
margin-bottom: var(--rs-space-6);
}

.main {
flex: 1;
overflow-y: auto;
width: 100%;
align-self: stretch;
padding: 0 var(--rs-space-4);
gap: var(--rs-space-6);
align-items: flex-start;
}
Expand All @@ -68,6 +67,7 @@

.footer {
width: 100%;
padding: 0 var(--rs-space-4);
gap: var(--rs-space-2);
}

Expand Down
Loading