Skip to content

Commit

Permalink
fix(html): add icon-picker classname to pickers with icon only
Browse files Browse the repository at this point in the history
  • Loading branch information
joneff committed Nov 23, 2021
1 parent f6bce2e commit 9a0b3cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/html/src/colorpicker/colorpicker.jsx
Expand Up @@ -52,7 +52,8 @@ function ColorpickerStatic(props) {

let colorpickerClasses = [
ownClassName,
'k-colorpicker'
'k-colorpicker',
'k-icon-picker'
];

let ariaAttr = aria
Expand Down Expand Up @@ -92,7 +93,7 @@ function ColorpickerStatic(props) {
return (
<PickerStatic className={colorpickerClasses} {...ariaAttr} {...htmlAttributes}>
{prefix}
<InputInnerSpanStatic showValue={false} valueIcon={<ColorPreviewStatic className="k-icon k-value-icon" color={value} iconName={iconName} />} />
<InputInnerSpanStatic showValue={false} valueIcon={<ColorPreviewStatic className="k-value-icon" color={value} iconName={iconName} />} />
{suffix}
<ButtonStatic className="k-input-button" icon="arrow-s" rounded="none" size={size} fillMode={fillMode}></ButtonStatic>
</PickerStatic>
Expand Down
5 changes: 4 additions & 1 deletion packages/html/src/dropdownlist/dropdownlist.jsx
Expand Up @@ -71,7 +71,10 @@ function DropdownListStatic(props) {

let dropdownListClasses = [
ownClassName,
'k-dropdown'
'k-dropdown',
{
'k-icon-picker': showValue !== true && (valueIcon !== null || valueIconName !== '')
}
];

let ariaAttr = aria
Expand Down

0 comments on commit 9a0b3cb

Please sign in to comment.