Skip to content

Commit

Permalink
fix(@clayui/color-picker): Splotch should use classes provided by Cla…
Browse files Browse the repository at this point in the history
…y CSS to style borders on light colors and active colors
  • Loading branch information
pat270 authored and bryceosterhaus committed Jul 23, 2020
1 parent bc571ea commit b426c46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/clay-color-picker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@clayui/form": "^3.9.0",
"@clayui/icon": "^3.0.5",
"@clayui/shared": "^3.2.0",
"classnames": "^2.2.6",
"tinycolor2": "^1.4.1"
},
"peerDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/clay-color-picker/src/Splotch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

import classNames from 'classnames';
import React from 'react';
import tinycolor from 'tinycolor2';

Expand Down Expand Up @@ -33,13 +34,12 @@ const ClayColorPickerSplotch = React.forwardRef<HTMLButtonElement, IProps>(
return (
<button
{...otherProps}
className={`btn clay-color-btn ${className ? className : ''}`}
className={classNames('btn clay-color-btn', className, {
active,
'clay-color-btn-bordered': requireBorder,
})}
ref={ref}
style={{
...(active ? {outline: 'auto 3px #55ADFF'} : {}),
...(requireBorder
? {border: '1px solid #E7E7ED'}
: {borderWidth: 0}),
background: `#${value}`,
height: size,
width: size,
Expand Down

0 comments on commit b426c46

Please sign in to comment.