Skip to content

Commit

Permalink
Inline function
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaspar Arme committed Oct 8, 2021
1 parent bd4b3e6 commit 1fe075f
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/js/components/DataTypes/String.js
Expand Up @@ -78,19 +78,13 @@ export default class extends React.PureComponent {
return result;
};

getStyle = () => {
let cursor = 'default';

if (this.isValueCollapsible()) {
cursor = 'pointer';
}

return { style: { cursor } };
};

render() {
const value = this.getValue();
let style = this.getStyle();
let style = {
style: {
cursor: this.isValueCollapsible() ? 'pointer' : 'default'
}
};

return (
<div {...Theme(this.props.theme, 'string')}>
Expand Down

0 comments on commit 1fe075f

Please sign in to comment.