Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
194 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react' | ||
|
||
class ArtistCreate extends React.Component { | ||
render() { | ||
return ( | ||
<div className="artist-registration-container"> | ||
<h1>Register as an artist</h1> | ||
<div className="artist-registration-form-wrapper"> | ||
<form className="artist-registration-form"> | ||
<div className="field"> | ||
<label htmlFor="name">Name</label> | ||
<input | ||
name="name" | ||
type="text" | ||
/> | ||
</div> | ||
<div className="field"> | ||
<label htmlFor="bio">Bio</label> | ||
<textarea | ||
name="bio" | ||
/> | ||
</div> | ||
|
||
<input | ||
className="button body-large" | ||
type="submit" | ||
value="Register" | ||
/> | ||
</form> | ||
</div> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default ArtistCreate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react' | ||
import { shallow } from 'enzyme' | ||
import ArtistCreate from './ArtistCreate' | ||
|
||
describe('<ArtistCreate />', () => { | ||
let artistCreateWrapper | ||
beforeEach(() => { | ||
artistCreateWrapper = shallow(<ArtistCreate />) | ||
}) | ||
it('has a form component', () => { | ||
expect(artistCreateWrapper.find('form')).toHaveLength(1) | ||
}) | ||
|
||
it('has a textbox for name', () => { | ||
expect(artistCreateWrapper.find("input[type='text']")).toHaveLength(1) | ||
}) | ||
|
||
it('has a text-area for capturing the bio', () => { | ||
expect(artistCreateWrapper.find('textarea')).toHaveLength(1) | ||
}) | ||
|
||
it('has a submit button', () => { | ||
expect(artistCreateWrapper.find("input[type='submit']")).toHaveLength(1) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
.artist-registration-container { | ||
grid-column: 1/-1; | ||
min-height: 0; | ||
padding-top: $padding-l; | ||
margin-bottom: $margin-r; | ||
|
||
h1 { | ||
color: $primary-color-white; | ||
} | ||
|
||
form { | ||
display: flex; | ||
flex-direction: column; | ||
margin-top: $margin-r; | ||
|
||
label, | ||
.label { | ||
color: $primary-color-white; | ||
margin-bottom: $margin-xs; | ||
|
||
span { | ||
color: $primary-color-white-darkest; | ||
} | ||
} | ||
|
||
.field { | ||
display: flex; | ||
flex-direction: column; | ||
margin-bottom: $margin-r; | ||
|
||
.sign-up-error { | ||
margin-top: $margin-xs; | ||
color: $validation-color-red; | ||
} | ||
} | ||
|
||
input[type="text"], | ||
input[type="password"], | ||
input[type="email"] { | ||
border: none; | ||
background-image: none; | ||
background-color: $primary-color-white; | ||
padding: $padding-xs; | ||
border-radius: 24px; | ||
outline: rgba($primary-color-white, 0); | ||
} | ||
|
||
input[type="submit"] { | ||
width: fit-content; | ||
font-size: 18px; | ||
} | ||
|
||
label[for="avatar"] { | ||
cursor: pointer; | ||
width: 72px; | ||
height: 72px; | ||
border: 2px dashed $primary-color-white; | ||
border-radius: 50%; | ||
background-color: $primary-color-darkblue-lightest; | ||
position: relative; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
.camera-icon { | ||
width: 24px; | ||
height: 24px; | ||
} | ||
|
||
.image-container { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 2; | ||
|
||
img { | ||
border-radius: 50%; | ||
} | ||
} | ||
} | ||
|
||
#avatar-label:hover { | ||
cursor: pointer; | ||
} | ||
|
||
#upload-avatar { | ||
opacity: 0; | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
} | ||
|
||
.actions { | ||
margin-top: $margin-s; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
|
||
a { | ||
text-decoration: underline; | ||
font-weight: bold; | ||
} | ||
} | ||
} | ||
} | ||
|
||
@media only screen and (min-width: 768px) { | ||
.artist-registration-container { | ||
grid-column: 4/10; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters