Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverts ColorPalette disableAlpha #18175 #18220

Merged
merged 1 commit into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }
/>
);
};