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 authored and KshitijThareja committed Dec 17, 2024
1 parent eb5d91f commit f40a054
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 @@ -37,7 +37,7 @@
</div>

<label
dir="auto"
:dir="labelDir"
class="k-radio-button-label"
:for="id"
:class="{ 'visuallyhidden': !showLabel }"
Expand Down Expand Up @@ -99,6 +99,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 f40a054

Please sign in to comment.