Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3249249
D5800.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D5800.diff
View Options
diff --git a/web/modals/threads/color-picker.react.js b/web/modals/threads/color-picker.react.js
deleted file mode 100644
--- a/web/modals/threads/color-picker.react.js
+++ /dev/null
@@ -1,78 +0,0 @@
-// @flow
-
-import * as React from 'react';
-import { type ColorResult, ChromePicker } from 'react-color';
-
-import css from '../../style.css';
-
-type Props = {
- +id: string,
- +value: string,
- +disabled: boolean,
- +onChange: (hex: string) => void,
-};
-type State = {
- +pickerOpen: boolean,
-};
-
-class ColorPicker extends React.PureComponent<Props, State> {
- constructor(props: Props) {
- super(props);
- this.state = {
- pickerOpen: false,
- };
- }
-
- render(): React.Node {
- let picker = null;
- if (this.state.pickerOpen && !this.props.disabled) {
- picker = (
- <div className={css['color-picker-selector']}>
- <ChromePicker
- color={this.props.value}
- onChangeComplete={this.onChangeColor}
- disableAlpha={true}
- />
- </div>
- );
- }
- const style = { backgroundColor: `#${this.props.value}` };
- return (
- <div
- className={css['color-picker-container']}
- tabIndex="0"
- onClick={this.onClick}
- onBlur={this.onBlur}
- onKeyDown={this.onPickerKeyDown}
- >
- <div className={css['color-picker-button']}>
- <div className={css['color-picker-preview']} style={style} />
- <div className={css['color-picker-down-symbol']}>▼</div>
- </div>
- {picker}
- </div>
- );
- }
-
- onPickerKeyDown: (
- event: SyntheticKeyboardEvent<HTMLTextAreaElement>,
- ) => void = event => {
- if (event.key === 'Escape') {
- this.setState({ pickerOpen: false });
- }
- };
-
- onChangeColor: (color: ColorResult) => void = color => {
- this.props.onChange(color.hex.substring(1, 7));
- };
-
- onClick: () => void = () => {
- this.setState({ pickerOpen: true });
- };
-
- onBlur: () => void = () => {
- this.setState({ pickerOpen: false });
- };
-}
-
-export default ColorPicker;
diff --git a/web/style.css b/web/style.css
--- a/web/style.css
+++ b/web/style.css
@@ -193,43 +193,6 @@
color: red;
}
-div.color-picker-container {
- outline: none;
- position: relative;
-}
-div.color-picker-button {
- margin: 6px 3px;
- overflow: hidden;
- cursor: pointer;
- padding: 4px;
- display: inline-block;
- border: solid 1px darkgray;
- background: #eee;
- color: #333;
- vertical-align: middle;
- border-radius: 3px;
-}
-div.color-picker-preview {
- width: 25px;
- height: 16px;
- border: solid 1px #222;
- margin-right: 5px;
- float: left;
- z-index: 0;
-}
-div.color-picker-down-symbol {
- padding: 1px 0;
- height: 16px;
- line-height: 16px;
- float: left;
- font-size: 10px;
-}
-div.color-picker-selector {
- position: absolute;
- left: 4px;
- top: 34px;
-}
-
@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min--moz-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2/1),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 12:55 PM (19 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2497930
Default Alt Text
D5800.diff (3 KB)
Attached To
Mode
D5800: [web] Deleted unused file
Attached
Detach File
Event Timeline
Log In to Comment