fix(TimePickerSelect): deprecate hideLabel to match spec

This commit is contained in:
josefaidt 2020-09-18 15:22:39 -05:00
commit e1fbd56231
2 changed files with 2 additions and 1 deletions

View file

@ -36,7 +36,6 @@ export const Default = () => ({
}, },
select: { select: {
disabled: boolean("Disabled (disabled in <TimePickerSelect>)", false), disabled: boolean("Disabled (disabled in <TimePickerSelect>)", false),
hideLabel: boolean("No label (hideLabel in <TimePickerSelect>)", true),
labelText: text( labelText: text(
"Label text (labelText in <TimePickerSelect>)", "Label text (labelText in <TimePickerSelect>)",
"Please select" "Please select"

View file

@ -24,6 +24,7 @@
export let labelText = ""; export let labelText = "";
/** /**
* @deprecated The `hideLabel` prop for `TimePickerSelect` is no longer needed and has been deprecated. It will be removed in the next major release.
* Set to `true` to visually hide the label text * Set to `true` to visually hide the label text
* @type {boolean} [hideLabel=false] * @type {boolean} [hideLabel=false]
*/ */
@ -72,6 +73,7 @@
for="{id}" for="{id}"
class:bx--label="{true}" class:bx--label="{true}"
class:bx--visually-hidden="{hideLabel}"> class:bx--visually-hidden="{hideLabel}">
<!-- TODO: set to always be `true` after `hideLabel` is deprecated -->
{labelText} {labelText}
</label> </label>
{/if} {/if}