-
Notifications
You must be signed in to change notification settings - Fork 0
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
14 changed files
with
373 additions
and
134 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
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,76 @@ | ||
import React from "react"; | ||
import AutosizeInput from "react-input-autosize"; | ||
import { CLASS_NAME_INPUT_SPACING } from "../constants/typeographyClassNames"; | ||
export default class PaperText extends React.Component { | ||
constructor() { | ||
super(); | ||
|
||
this.state = { | ||
focused: false | ||
}; | ||
|
||
this.onFocus = this.onFocus.bind(this); | ||
this.onBlur = this.onBlur.bind(this); | ||
} | ||
|
||
onFocus(e) { | ||
if (this.props.enabled) { | ||
this.setState({ | ||
focused: true | ||
}); | ||
e.preventDefault(); | ||
e.stopProgagation(); | ||
} | ||
} | ||
|
||
onBlur(e) { | ||
if (this.props.enabled) { | ||
this.setState({ | ||
focused: false | ||
}); | ||
e.preventDefault(); | ||
e.stopProgagation(); | ||
} | ||
} | ||
|
||
render() { | ||
const { | ||
props: { className, value }, | ||
state: { focused } | ||
} = this; | ||
|
||
return ( | ||
<div className="mv0 dib"> | ||
{focused ? ( | ||
<React.Fragment> | ||
<AutosizeInput | ||
value={value} | ||
autoComplete="off" | ||
autoFocus | ||
inputStyle={{ | ||
fontFamily: "inherit" | ||
}} | ||
type="text" | ||
name={this.props.name} | ||
onChange={this.props.onChange} | ||
onBlur={this.onBlur} | ||
inputClassName={`mw-100 db input-reset outline-0 ba bw1 b--black ph2 pv0 ${className}`} | ||
onKeyDown={e => { | ||
if (e.key === "Enter") this.onBlur(); | ||
}} | ||
/> | ||
</React.Fragment> | ||
) : ( | ||
<span | ||
className={`${CLASS_NAME_INPUT_SPACING} ${className}`} | ||
onClick={this.onFocus} | ||
onFocus={this.onFocus} | ||
tabIndex="0" | ||
> | ||
{value} | ||
</span> | ||
)} | ||
</div> | ||
); | ||
} | ||
} |
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,7 @@ | ||
import React from "react"; | ||
|
||
export default ({ children, ...attrs }) => ( | ||
<div className="tl mb4" {...attrs}> | ||
{children} | ||
</div> | ||
); |
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,8 @@ | ||
import React from "react"; | ||
import { CLASS_NAME_H2 } from "../../constants/typeographyClassNames"; | ||
|
||
export default ({ children }) => ( | ||
<h2 className={`tl ma0 pa2 ba bw1 b--white ${CLASS_NAME_H2}`}> | ||
Employment History | ||
</h2> | ||
); |
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,9 @@ | ||
import React from "react"; | ||
|
||
export default ({ children }) => ( | ||
<div className="tc"> | ||
<div className="bl bw05 min-vh-100 b--light-gray w-50 dib pa3"> | ||
{children} | ||
</div> | ||
</div> | ||
); |
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,3 @@ | ||
import React from "react"; | ||
|
||
export default ({ children }) => <ul className="mh0 mv2 pv0">{children}</ul>; |
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,8 @@ | ||
import React from "react"; | ||
import { CLASS_NAME_TEXT_SMALL } from "../../constants/typeographyClassNames"; | ||
|
||
export default ({ children, ...attrs }) => ( | ||
<li {...attrs} className={`mv1 pv0 ${CLASS_NAME_TEXT_SMALL}`}> | ||
{children} | ||
</li> | ||
); |
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,7 @@ | ||
export const CLASS_NAME_H1 = "f3 black"; | ||
export const CLASS_NAME_H1_SUB = "f6 mid-gray"; | ||
export const CLASS_NAME_H2 = "f5 bold black"; | ||
export const CLASS_NAME_H3 = "f5 black"; | ||
export const CLASS_NAME_H3_SUB = "f6 mid-gray"; | ||
export const CLASS_NAME_TEXT_SMALL = "f6 black"; | ||
export const CLASS_NAME_INPUT_SPACING = "db ba bw1 b--white ph2 pv0"; |
Oops, something went wrong.