Skip to content

Commit

Permalink
Reverts ColorPalette disableAlpha #18175 (#18220)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaz authored and youknowriad committed Nov 11, 2019
1 parent 6f4dfc1 commit bf5c163
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
8 changes: 0 additions & 8 deletions packages/components/src/color-palette/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ Whether the palette should have a clearing button or not.
- Required: No
- Default: true

### disableAlpha

Whether to disable alpha channel controls or not.

- Type: `Boolean`
- Required: No
- Default: true


## Usage
```jsx
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/color-palette/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default function ColorPalette( {
clearable = true,
className,
colors,
disableAlpha = true,
disableCustomColors = false,
onChange,
value,
Expand Down Expand Up @@ -56,7 +55,7 @@ export default function ColorPalette( {
<ColorPicker
color={ value }
onChangeComplete={ ( color ) => onChange( color.hex ) }
disableAlpha={ disableAlpha }
disableAlpha
/>
),
[ value ]
Expand Down
15 changes: 0 additions & 15 deletions packages/components/src/color-palette/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,3 @@ export const withKnobs = () => {
/>
);
};

export const withAlpha = () => {
const colors = [
object( 'Red', { name: 'red', color: '#f00' } ),
object( 'White', { name: 'white', color: '#fff' } ),
object( 'Blue', { name: 'blue', color: '#00f' } ),
];

return (
<ColorPaletteWithState
colors={ colors }
disableAlpha={ false }
/>
);
};

0 comments on commit bf5c163

Please sign in to comment.