GenericComponentProps
Common React Component Props
API
interface GenericComponentProps {
/**
* A Unique identifier for a component or `DOM` element
*/
id?: string;
/**
* Extra CSS classes to add to the component
*/
className?: string;
/**
* A boolean attribute which is present if the component should be disabled
*/
disabled?: boolean;
/**
* The aria-label attribute is used to define a string that labels the current element.
* Use it in cases where a text label is not visible on the screen.
* If there is visible text labeling the element, use aria-labelledby instead.
*/
"aria-label"?: string;
/**
* A `data-attribute` identifier for testing purposes
*/
"data-testid"?: string;
/**
* The tabindex global attribute indicates that its element can be focused,
* and where it participates in sequential keyboard navigation (usually with the `tab` key, hence the name).
*/
tabIndex?: number;
/**
* Custom CSS Styles
*/
style?: React.CSSProperties;
/**
* An element must be filled with content
*/
required?: React.HTMLAttributes<HTMLElement>["aria-required"];
}
Usage
import { GenericComponentProps } from '@feedzai/js-utilities';
type Props = GenericComponentProps & {
anotherProps?: Boolean;
}