1.3.3 • Published 2 months ago

@visa/keyboard-instructions v1.3.3

Weekly downloads
-
License
SEE LICENCE IN LI...
Repository
github
Last release
2 months ago

@visa/keyboard-instructions

An image depicting an example of the default keyboard-instructions component

<keyboard-instructions
  uniqueID={this.chartID}
  isCompact
  tableColumns={this.tableColumns}
  data={this.tableData}
  padding={this.padding}
  margin={this.margin}
  hidekeyboardInstructions={this.accessibility.hidekeyboardInstructionsButton}
/>

# Installation Steps


  • Using npm

    $ npm i @visa/keyboard-instructions
  • Using yarn

    $ yarn add @visa/keyboard-instructions

# Props Documentation


# Keyboard Instructions Props <>

The data-component expects to be utilized within a Visa Chart Component, we do some data preparation in each chart to try and map chart data into a structure that is meaningful for an accompanying keyboard instructions component. Properties for this component are documented below, but you should also refer to a Visa Chart Component to see detail on how this sub-component is leveraged.

NameTypeDefault Value(s)Description
marginobject (custom type)IBoxModelTypeExpects the margin property to be passed from a visa chart components chart. This prop is used to determine button placement, when visible.
paddingobject (custom type)IBoxModelTypeExpects the padding property to be passed from a visa chart components chart. This prop is used to determine button placement, when visible.
isCompactbooleanfalseSet to true by each visa chart component, renders a more compact version of the keyboard instructions component.
hidekeyboardInstructionsbooleanfalseIf true, hides the keyboard instructions component button (but it is still available to screen reader users).
uniqueIDstringundefinedID used to identify chart (must be unique per keyboard instructions component), helpful for validation messages. A string must be passed.
tableColumnsstring[]undefinedPopulates the column headers of the table, in order.
dataobject[]undefinedPopulates the content/rows of the table, data needs to be aligned to tableColumns provided.
unitTestbooleanfalseWhen set to true, adds testing attributes to the rendered keyboard-instructions components for ease of selection during unit testing.

IBoxModelType Definition

NameTypeDefault Value(s)Description
topnumberheight * 0.01Sets the top margin/padding for the chart container.
bottomnumberheight * 0.01Sets the bottom margin/padding for the chart container.
leftnumberwidth * 0.01Sets the top margin/padding for the chart container.
rightnumberwidth * 0.01Sets the top margin/padding for the chart container.