UNPKG

@patreon/studio

Version:

Patreon Studio Design System

46 lines (45 loc) 1.41 kB
import type { ReactNode } from 'react'; import type { css } from 'styled-components'; export declare type BaseAriaProps = React.HTMLAttributes<HTMLElement>; export interface AssignableElementProps { /** The element to render */ as?: React.ElementType; } export interface BaseProps { /** Tag for testing */ 'data-tag'?: string; /** HTML id property */ id?: string; } /** @deprecated use StylableProps with className instead */ export interface LegacyStylableProps { /** * Custom css applied to the root element * @deprecated use `className` with CSS Module styles instead. **/ css?: ReturnType<typeof css>; } export declare type StyleVariableObject = Record<`--${string}`, string | number>; export interface StylableProps { /** Custom className applied to the root element */ className?: string; /** * Inject CSS variables into the component for use within CSS Modules. * Only accepts a record of `--${string}: string | number` values. **/ style?: StyleVariableObject; } export interface ChildrenProps { /** content to render */ children?: ReactNode; } export interface LoggerProps { /** * Unique identifier of the component used for logging. */ loggerId?: string; /** * Optional additional fields to log in `Studio Action` */ loggerProps?: Record<string, string | number | boolean>; }