Skip to content

Commit

Permalink
Add labelDir to KCheckbox and KRadioButton
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVelezLl committed Sep 16, 2024
1 parent c7432ff commit 5be2f9e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion lib/KCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</div>

<label
dir="auto"
:dir="labelDir"
class="k-checkbox-label"
:for="id"
:class="{ 'visuallyhidden': !showLabel }"
Expand Down Expand Up @@ -84,6 +84,14 @@
type: String,
default: null,
},
/**
* RTL dir of the text label
* Options: 'auto', 'ltr', 'rtl', null.
*/
labelDir: {
type: String,
default: 'auto',
},
/**
* Whether or not to show the label
*/
Expand Down
10 changes: 9 additions & 1 deletion lib/KRadioButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</div>

<label
dir="auto"
:dir="labelDir"
class="k-radio-button-label"
:for="id"
:class="{ 'visuallyhidden': !showLabel }"
Expand Down Expand Up @@ -96,6 +96,14 @@
type: Boolean,
default: true,
},
/**
* RTL dir of the text label
* Options: 'auto', 'ltr', 'rtl', null.
*/
labelDir: {
type: String,
default: 'auto',
},
/**
* Component `data` with which to associate this radio button and its siblings
*/
Expand Down

0 comments on commit 5be2f9e

Please sign in to comment.