-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update suggestor example app (markup/styles)
- clean up index.html
- Loading branch information
Showing
9 changed files
with
142 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react'; | ||
import Example from '../example/Example'; | ||
import styles from './app.css'; | ||
|
||
const App = () => ( | ||
<React.Fragment> | ||
<header className={styles.header}> | ||
<div className={styles.title}> | ||
<h1>{'<ssuggestor>'}</h1> | ||
<h2>React Simple Suggestor</h2> | ||
</div> | ||
<a | ||
className={styles.link} | ||
href="https://github.com/carloluis/ssuggestor" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Code and Docs on GitHub | ||
</a> | ||
</header> | ||
<section className={styles.container}> | ||
<Example /> | ||
</section> | ||
<footer className={styles.footer}> | ||
<span> | ||
MIT ©{' '} | ||
<a href="https://twitter.com/carloluis_" target="_blank" rel="noopener noreferrer"> | ||
Carloluis | ||
</a>{' '} | ||
2017 | ||
</span> | ||
</footer> | ||
</React.Fragment> | ||
); | ||
|
||
export default App; |
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,72 @@ | ||
@import '../../styles/palette.css'; | ||
|
||
.header { | ||
background-color: var(--blue); | ||
text-align: center; | ||
padding: 24px 24px 0; | ||
margin-bottom: 24px; | ||
position: sticky; | ||
top: -50px; | ||
z-index: 11; | ||
} | ||
|
||
.header::after { | ||
position: absolute; | ||
content: ''; | ||
display: block; | ||
left: 0; | ||
bottom: -24px; | ||
border-style: solid; | ||
border-width: 0 100vw 24px 0; | ||
border-color: transparent var(--blue) transparent transparent; | ||
} | ||
|
||
.title { | ||
padding: 16px 0; | ||
text-align: center; | ||
color: var(--white); | ||
margin: 0 auto; | ||
} | ||
|
||
.title h2 { | ||
font-size: 24px; | ||
} | ||
|
||
.link { | ||
display: inline-block; | ||
background-color: var(--grey); | ||
color: var(--blue); | ||
text-align: center; | ||
padding: 8px 16px; | ||
transition: all 0.3s ease-in-out; | ||
} | ||
|
||
.link:hover { | ||
text-decoration: none; | ||
font-weight: 500; | ||
} | ||
|
||
.container { | ||
max-width: 640px; | ||
width: 90%; | ||
margin: 0 auto; | ||
padding: 16px; | ||
} | ||
|
||
.footer { | ||
position: fixed; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
z-index: 11; | ||
text-align: center; | ||
background-color: var(--grey); | ||
padding: 8px 16px; | ||
color: var(--blue); | ||
} | ||
|
||
.footer a:hover { | ||
text-decoration: none; | ||
color: var(--blue); | ||
font-weight: 500; | ||
} |
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,15 @@ | ||
:global .suggestor input { | ||
font-weight: 600; | ||
font-size: 20px; | ||
height: 40px; | ||
} | ||
|
||
:global .suggestor li { | ||
font-size: 16px; | ||
height: 26px; | ||
} | ||
|
||
:global .suggestor ::-webkit-input-placeholder { | ||
font-weight: normal; | ||
font-size: 18px; | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import Example from './example/Example'; | ||
import App from './app/App'; | ||
|
||
export default Example; | ||
export default App; |
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 |
---|---|---|
@@ -1,19 +1,12 @@ | ||
@import './styles/palette.css'; | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
:global .suggestor input { | ||
font-weight: 600; | ||
font-size: 20px; | ||
height: 40px; | ||
} | ||
|
||
:global .suggestor li { | ||
font-size: 16px; | ||
height: 26px; | ||
} | ||
|
||
:global .suggestor ::-webkit-input-placeholder { | ||
font-weight: normal; | ||
font-size: 18px; | ||
body { | ||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | ||
font-size: 14px; | ||
line-height: 1.42857143; | ||
overflow-x: hidden; | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import Example from './components'; | ||
import App from './components'; | ||
import './index.css'; | ||
|
||
ReactDOM.render(<Example />, document.getElementById('example')); | ||
ReactDOM.render(<App />, document.getElementById('app')); |
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,6 @@ | ||
:root { | ||
--light-blue: #5ebdf7; | ||
--blue: #1187b9; | ||
--grey: #eaeaea; | ||
--white: #fff; | ||
} |