feat: exporting redesign (#3613)

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
David Luzar 2021-05-25 21:37:14 +02:00 committed by GitHub
parent 357266e9ab
commit 790c9fd02e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 793 additions and 385 deletions

View file

@ -3,6 +3,8 @@ import "./TextInput.scss";
import React, { Component } from "react";
import { focusNearestParent } from "../utils";
import "./ProjectName.scss";
type Props = {
value: string;
onChange: (value: string) => void;
@ -37,8 +39,8 @@ export class ProjectName extends Component<Props, State> {
public render() {
return (
<>
<label htmlFor="file-name">
<div className="ProjectName">
<label className="ProjectName-label" htmlFor="filename">
{`${this.props.label}${this.props.isNameEditable ? "" : ":"}`}
</label>
{this.props.isNameEditable ? (
@ -46,18 +48,18 @@ export class ProjectName extends Component<Props, State> {
className="TextInput"
onBlur={this.handleBlur}
onKeyDown={this.handleKeyDown}
id="file-name"
id="filename"
value={this.state.fileName}
onChange={(event) =>
this.setState({ fileName: event.target.value })
}
/>
) : (
<span className="TextInput TextInput--readonly" id="file-name">
<span className="TextInput TextInput--readonly" id="filename">
{this.props.value}
</span>
)}
</>
</div>
);
}
}