feat(dropdown): add hideLabel prop

This commit is contained in:
Eric Liu 2021-02-03 09:51:56 -08:00
commit 1cb9345653
5 changed files with 27 additions and 0 deletions

View file

@ -3858,6 +3858,16 @@
"constant": false,
"reactive": false
},
{
"name": "hideLabel",
"kind": "let",
"description": "Set to `true` to visually hide the label text",
"type": "boolean",
"value": "false",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "translateWithId",
"kind": "let",

View file

@ -13,6 +13,12 @@ components: ["Dropdown", "DropdownSkeleton"]
{id: "1", text: "Email"},
{id: "2", text: "Fax"}]}" />
### Hidden label
<Dropdown hideLabel titleText="Contact" selectedIndex={0} items="{[{id: "0", text: "Slack"},
{id: "1", text: "Email"},
{id: "2", text: "Fax"}]}" />
### Format item display text
Use the `itemToString` prop to format the display of individual items.