Skip to content

Commit b426c46

Browse files
pat270bryceosterhaus
authored andcommitted
fix(@clayui/color-picker): Splotch should use classes provided by Clay CSS to style borders on light colors and active colors
1 parent bc571ea commit b426c46

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/clay-color-picker/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@clayui/form": "^3.9.0",
3131
"@clayui/icon": "^3.0.5",
3232
"@clayui/shared": "^3.2.0",
33+
"classnames": "^2.2.6",
3334
"tinycolor2": "^1.4.1"
3435
},
3536
"peerDependencies": {

packages/clay-color-picker/src/Splotch.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* SPDX-License-Identifier: BSD-3-Clause
44
*/
55

6+
import classNames from 'classnames';
67
import React from 'react';
78
import tinycolor from 'tinycolor2';
89

@@ -33,13 +34,12 @@ const ClayColorPickerSplotch = React.forwardRef<HTMLButtonElement, IProps>(
3334
return (
3435
<button
3536
{...otherProps}
36-
className={`btn clay-color-btn ${className ? className : ''}`}
37+
className={classNames('btn clay-color-btn', className, {
38+
active,
39+
'clay-color-btn-bordered': requireBorder,
40+
})}
3741
ref={ref}
3842
style={{
39-
...(active ? {outline: 'auto 3px #55ADFF'} : {}),
40-
...(requireBorder
41-
? {border: '1px solid #E7E7ED'}
42-
: {borderWidth: 0}),
4343
background: `#${value}`,
4444
height: size,
4545
width: size,

0 commit comments

Comments
 (0)