Skip to content
Snippets Groups Projects
Commit a65f27aa authored by johnshaughnessy's avatar johnshaughnessy
Browse files

Give up on css for now until I can get help.

parent e5d52044
No related branches found
No related tags found
No related merge requests found
@import 'shared'; @import 'shared';
:local(.addMediaForm) {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
margin: 0;
}
:local(.actionButton) {
@extend %bottom-action-button;
margin-left: 6px;
margin-right: 6px;
appearance: none;
width: 128px;
text-align: center;
-moz-appearance: none;
-webkit-appearance: none;
}
:local(.buttons) {
display: flex;
flex-direction: row;
align-items: center;
}
:local(.smallButton) { :local(.smallButton) {
padding-right: 5%; padding-left: 0.25em;
padding-right: 0.5em;
font-size: 2em; font-size: 2em;
align-self: center; align-self: center;
} }
:local(.cancelIcon) { :local(.cancelIcon) {
padding-left: 2%;
color: white; color: white;
:hover { &:hover {
color: #FF3D7F color: #FF3D7F
} }
} }
:local(.uploadIcon) { :local(.uploadIcon) {
color: white; color: white;
:hover { &:hover {
color: #2F80ED; color: #2F80ED;
} }
} }
:local(.inputBorder) { :local(.inputBorder) {
margin: 2% 1% 2% 1%;
display: flex; display: flex;
width: 100%; align-self: stretch;
height: 60px;
justify-content: space-between; justify-content: space-between;
@extend %rounded-border; border: 0.25em solid white;
border-radius: 1em;
margin: 1em;
padding: 0.5em;
@extend %default-font; @extend %default-font;
} }
:local(.urlInput) { :local(.leftSideOfInput) {
flex-grow: 1;
border: none; border: none;
text-align: center;
font-size: 1.3em;
padding-left: 8%;
padding-right: 0%;
width: 80%;
white-space: nowrap; white-space: nowrap;
} background: transparent;
color: white;
:local(.fileNameLabel) {
border: none;
text-align: center; text-align: center;
align-self: center; align-self: center;
padding-left: 8%;
padding-right: 0%;
width: 80%;
}
:local(.form) {
width: 80%;
} }
:local(.hideFileInput) { :local(.hideFileInput) {
width: 0.1px; visibility: hidden;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute; position: absolute;
z-index: -1;
} }
...@@ -96,12 +96,10 @@ export default class CreateObjectDialog extends Component { ...@@ -96,12 +96,10 @@ export default class CreateObjectDialog extends Component {
<FontAwesomeIcon icon={faPaperclip} /> <FontAwesomeIcon icon={faPaperclip} />
</label> </label>
); );
const filenameLabel = ( const filenameLabel = <label className={cx(styles.leftSideOfInput)}>{this.state.fileName}</label>;
<label className={cx(styles.fileNameLabel, "add-media-form__link_field")}>{this.state.fileName}</label>
);
const urlInput = ( const urlInput = (
<input <input
className={cx(styles.urlInput, "add-media-form__link_field")} className={cx(styles.leftSideOfInput)}
placeholder="Image/Video/glTF URL" placeholder="Image/Video/glTF URL"
onChange={this.onUrlChange} onChange={this.onUrlChange}
value={this.state.url} value={this.state.url}
...@@ -112,14 +110,14 @@ export default class CreateObjectDialog extends Component { ...@@ -112,14 +110,14 @@ export default class CreateObjectDialog extends Component {
<div> <div>
{isMobile ? mobileInstructions : desktopInstructions} {isMobile ? mobileInstructions : desktopInstructions}
<form onSubmit={this.onCreateClicked}> <form onSubmit={this.onCreateClicked}>
<div className="add-media-form"> <div className={styles.addMediaForm}>
<input id={fileInputId} className={styles.hideFileInput} type="file" onChange={this.onFileChange} /> <input id={fileInputId} className={styles.hideFileInput} type="file" onChange={this.onFileChange} />
<div className={styles.inputBorder}> <div className={styles.inputBorder}>
{this.state.file ? filenameLabel : urlInput} {this.state.file ? filenameLabel : urlInput}
{this.state.url || this.state.fileName ? cancelButton : uploadButton} {this.state.url || this.state.fileName ? cancelButton : uploadButton}
</div> </div>
<div className="add-media-form__buttons"> <div className={styles.buttons}>
<button className="add-media-form__action-button"> <button className={styles.actionButton}>
<span>create</span> <span>create</span>
</button> </button>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment