mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
Merge pull request #261 from josefaidt/260-deprecate-hidelabel-time-picker
fix(TimePickerSelect): deprecate hideLabel to match spec
This commit is contained in:
commit
f15df7169f
2 changed files with 5 additions and 4 deletions
|
@ -36,7 +36,6 @@ export const Default = () => ({
|
|||
},
|
||||
select: {
|
||||
disabled: boolean("Disabled (disabled in <TimePickerSelect>)", false),
|
||||
hideLabel: boolean("No label (hideLabel in <TimePickerSelect>)", true),
|
||||
labelText: text(
|
||||
"Label text (labelText in <TimePickerSelect>)",
|
||||
"Please select"
|
||||
|
|
|
@ -24,10 +24,11 @@
|
|||
export let labelText = "";
|
||||
|
||||
/**
|
||||
* Set to `true` to visually hide the label text
|
||||
* @type {boolean} [hideLabel=false]
|
||||
* @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 `false` to show the label text
|
||||
* @type {boolean} [hideLabel=true]
|
||||
*/
|
||||
export let hideLabel = false;
|
||||
export let hideLabel = true;
|
||||
|
||||
/**
|
||||
* Set an id for the select element
|
||||
|
@ -72,6 +73,7 @@
|
|||
for="{id}"
|
||||
class:bx--label="{true}"
|
||||
class:bx--visually-hidden="{hideLabel}">
|
||||
<!-- TODO: set to always be `true` after `hideLabel` is deprecated -->
|
||||
{labelText}
|
||||
</label>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue