Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC-458 CurrentTab documentation revision #364

Closed
wants to merge 1 commit into from
Closed
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
18 changes: 14 additions & 4 deletions src/ui/CurrentTab/CurrentTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export interface ICurrentTabOptions {
}

/**
* This component is used to display the name of the currently selected tab.
* If no tabs are selected, this component is hidden.
* The CurrentTab component displays the name of the currently selected {@link Tab}. If no Tab is selected, this
* component is not visible.
*/
export class CurrentTab extends Component {
static ID = 'CurrentTab';
Expand All @@ -26,13 +26,23 @@ export class CurrentTab extends Component {
* @componentOptions
*/
static options: ICurrentTabOptions = {

/**
* Specifies the CSS selector to the section which contains the tab.
* Clicking this component will toggle between opening and closing this section.
* Specifies the CSS selector targeting the section which contains the {@link Tab}.
* Clicking the CurrentTab component toggles between opening and closing this section.
*
* Default value is `undefined`.
*/
tabSectionToOpen: ComponentOptions.buildStringOption()
};

/**
* Creates a new CurrentTab component.
* @param element The HTMLElement on which to instantiate the component.
* @param options The options for the CurrentTab component.
* @param bindings The bindings that the component requires to function normally. If not set, these will be
* automatically resolved (with a slower execution time).
*/
constructor(public element: HTMLElement, public options?: ICurrentTabOptions, bindings?: IComponentBindings) {
super(element, CurrentTab.ID, bindings);

Expand Down