ButtonToggle
Overview
Button group showing 2 options, one of which must be active
import { ButtonToggle } from ‘@ska-telescope/ska-gui-components’;
…
<ButtonToggle data={data} testId=”testId” />
Property |
Type |
Required |
default |
|
|---|---|---|---|---|
ariaDescription |
string |
No |
Used by Screen Readers |
|
ariaTitle |
string |
No |
ButtonToggle |
Used by Screen Readers |
current |
string |
Yes |
Value of the currently active element |
|
disabled |
boolean |
false |
Allows the group to be disabled |
|
options |
object |
Yes |
{ id: string, label: string, value: any}[] Max 2 |
|
setValue |
function |
Yes |
Function to update the value when clicked |
|
testId |
string |
No |
SPECIAL |
Value is “telescopeSelectorId” for this component |
toolTip |
string |
No |
‘’ |
Optional toolTip for the toggle |
toolTipPlacement |
string |
No |
bottom |
Allows for the positioning of the tooltip to be moved from the default |
value |
object |
Yes |
Object of the currently active element |
Constants
none
Testing Identifier
Provided by the property testId