@devopness/ui-react
Version:
Devopness Design System React Components - Painless essential DevOps to everyone
29 lines (28 loc) • 935 B
TypeScript
import { ComponentPropsWithoutRef } from 'react';
import { Button } from '../../Buttons';
import { Icon } from '../../../icons';
/**
* Props for the `ToggleContentButton` component.
*/
type ToggleContentButtonProps = ComponentPropsWithoutRef<typeof Button> & {
/** Whether the content is currently visible
* @default false
*/
showContent?: boolean;
/** Optional props when hiding the content */
hideContentProps?: {
text?: string;
icon?: Icon;
};
/** Optional props when revealing the content */
revealContentProps?: {
text?: string;
icon?: Icon;
};
};
/**
* Button to toggle visibility of sensitive content.
*/
declare const ToggleContentButton: ({ showContent, hideContentProps, revealContentProps, ...props }: ToggleContentButtonProps) => import("react/jsx-runtime").JSX.Element;
export { ToggleContentButton };
export type { ToggleContentButtonProps };