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

Revert "Make project template workspace icon tab navigable" #57924

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 23 additions & 19 deletions apps/src/templates/ProjectTemplateWorkspaceIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import React from 'react';
import ReactTooltip from 'react-tooltip';
import _ from 'lodash';
import PropTypes from 'prop-types';
import moduleStyles from './project-template-workspace-icon.module.scss';
import classNames from 'classnames';

var msg = require('@cdo/locale');

const IMAGE_BASE_URL = '/blockly/media/';
Expand All @@ -21,36 +18,43 @@ export default class ProjectTemplateWorkspaceIcon extends React.Component {

render() {
return (
<div className={moduleStyles.container}>
<button
type="button"
<div style={styles.container}>
<img
style={styles.projectTemplateIcon}
className="projectTemplateWorkspaceIcon"
src={IMAGE_BASE_URL + 'connect.svg'}
data-tip
data-for={this.tooltipId}
aria-describedby={this.tooltipId}
data-event="mouseenter mouseleave click"
className={moduleStyles.projectTemplateButton}
>
<img
className={classNames(
'projectTemplateWorkspaceIcon',
moduleStyles.projectTemplateIcon
)}
src={IMAGE_BASE_URL + 'connect.svg'}
alt={msg.workspaceProjectTemplateLevel()}
/>
</button>
alt={msg.workspaceProjectTemplateLevel()}
/>
<ReactTooltip
id={this.tooltipId}
role="tooltip"
wrapper="div"
effect="solid"
place={this.props.tooltipPlace}
>
<div className={moduleStyles.tooltip}>
<div style={styles.tooltip}>
{msg.workspaceProjectTemplateLevel()}
</div>
</ReactTooltip>
</div>
);
}
}

const styles = {
container: {
display: 'inline-block',
},
tooltip: {
maxWidth: 200,
lineHeight: '20px',
whiteSpace: 'normal',
},
projectTemplateIcon: {
marginRight: 5,
marginTop: -1,
},
};
24 changes: 0 additions & 24 deletions apps/src/templates/project-template-workspace-icon.module.scss

This file was deleted.