@hashicorp/design-system-components
Version:
Helios Design System Components
28 lines (27 loc) • 993 B
TypeScript
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Component from '@glimmer/component';
import type { HdsDisclosurePrimitiveSignature } from '../disclosure-primitive';
import type { HdsRevealToggleButtonSignature } from './toggle/button';
export interface HdsRevealSignature {
Args: {
text: HdsRevealToggleButtonSignature['Args']['text'];
textWhenOpen?: HdsRevealToggleButtonSignature['Args']['text'];
isOpen?: HdsRevealToggleButtonSignature['Args']['isOpen'];
ariaDescribedBy?: string;
};
Blocks: {
default: [];
};
Element: HdsDisclosurePrimitiveSignature['Element'];
}
export default class HdsReveal extends Component<HdsRevealSignature> {
/**
* @param getText
* @type {string}
* @description A local function that emulates a getter to compute the value of the `@text` argument for the button (mainly to make TypeScript happy)
*/
getText: (isOpen: boolean) => string;
}