react-dock

This commit is contained in:
Nathan Bierema 2024-08-04 19:49:13 -04:00
parent 36ff68ac55
commit 9c82273206
2 changed files with 3 additions and 3 deletions

View File

@ -385,7 +385,7 @@ export default class Dock extends Component<Props, State> {
handleDimClick = () => { handleDimClick = () => {
if (this.props.dimMode === 'opaque') { if (this.props.dimMode === 'opaque') {
this.props.onVisibleChange && this.props.onVisibleChange(false); if (this.props.onVisibleChange) this.props.onVisibleChange(false);
} }
}; };
@ -471,7 +471,7 @@ export default class Dock extends Component<Props, State> {
break; break;
} }
this.props.onSizeChange && this.props.onSizeChange(size); if (this.props.onSizeChange) this.props.onSizeChange(size);
if (!isControlled) { if (!isControlled) {
this.setState({ size }); this.setState({ size });

View File

@ -48,7 +48,7 @@ function prefixProp<Value>(key: string, value: Value) {
export default function autoprefix(style: CSSProperties) { export default function autoprefix(style: CSSProperties) {
return Object.keys(style).reduce( return Object.keys(style).reduce(
(obj, key) => (obj, key) =>
vendorSpecificProperties.indexOf(key) !== -1 vendorSpecificProperties.includes(key)
? { ? {
...obj, ...obj,
...prefixProp(key, style[key as keyof CSSProperties]), ...prefixProp(key, style[key as keyof CSSProperties]),