@hmcts/annotation-ui-lib
Version:
PDF Viewer and ability to highlight text with and comment tracking
62 lines • 2.61 kB
JSON
[
{
"name": "element",
"type": "string",
"required": false,
"description": "Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`."
},
{
"name": "text",
"type": "string",
"required": true,
"description": "If `html` is set, this is not required. Text for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`."
},
{
"name": "html",
"type": "string",
"required": true,
"description": "If `text` is set, this is not required. HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`."
},
{
"name": "name",
"type": "string",
"required": true,
"description": "Name for the `input` or `button`. This has no effect on `a` elements."
},
{
"name": "type",
"type": "string",
"required": true,
"description": "Type of `input` or `button` – `button`, `submit` or `reset`. Defaults to `submit`. This has no effect on `a` elements."
},
{
"name": "value",
"type": "string",
"required": true,
"description": "Value for the `button` tag. This has no effect on `a` or `input` elements."
},
{
"name": "disabled",
"type": "boolean",
"required": false,
"description": "Whether the button should be disabled. For button and input elements, `disabled` and `aria-disabled` attributes will be set automatically."
},
{
"name": "href",
"type": "string",
"required": false,
"description": "The URL that the button should link to. If this is set, `element` will be automatically set to `a` if it has not already been defined."
},
{
"name": "classes",
"type": "string",
"required": false,
"description": "Classes to add to the button component."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the button component."
}
]