Skip to content

Commit e4b3307

Browse files
committed
Tweak formatting
1 parent 4369af3 commit e4b3307

File tree

5 files changed

+40
-39
lines changed

5 files changed

+40
-39
lines changed

docs/modules.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ const { readFileSync, writeFileSync } = require('fs')
44

55
const { dependencies } = require('./package.json')
66

7-
const px = Object
8-
.keys(dependencies)
7+
const px = Object.keys(dependencies)
98
.filter(m => /^tachyons-/.test(m))
109
.filter(m => !/^tachyons-(colors|generator|styles)/.test(m))
1110
.map(async m => {
@@ -36,10 +35,11 @@ const px = Object
3635
}
3736
})
3837

39-
Promise
40-
.all(px)
41-
.then(modules => {
42-
const reduced = modules.reduce((acc, m) => Object.assign(acc, { [m.name]: m }), {})
38+
Promise.all(px).then(modules => {
39+
const reduced = modules.reduce(
40+
(acc, m) => Object.assign(acc, { [m.name]: m }),
41+
{}
42+
)
4343

44-
writeFileSync('data.json', JSON.stringify({ modules: reduced }, null, 2))
45-
})
44+
writeFileSync('data.json', JSON.stringify({ modules: reduced }, null, 2))
45+
})

docs/ui/Editor.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,43 @@ import he from 'he'
55
const isDotHTML = (cx = '') => /language-\.html/.test(cx)
66

77
class Editor extends Component {
8-
constructor (props) {
9-
super()
8+
constructor(props) {
9+
super()
1010

11-
this.state = {
11+
this.state = {
1212
shouldLiveEdit: isDotHTML(props.className),
13-
html: props.children[0] || ''
14-
}
15-
}
13+
html: props.children[0] || ''
14+
}
15+
}
1616

1717
handleChange = e => {
1818
this.setState({
1919
html: e.target.value
2020
})
2121
}
2222

23-
render () {
24-
if (!this.state.shouldLiveEdit) {
25-
return <code {...this.props} />
26-
}
23+
render() {
24+
if (!this.state.shouldLiveEdit) {
25+
return <code {...this.props} />
26+
}
2727

28-
return (
29-
<div>
28+
return (
29+
<div>
3030
<textarea
3131
rows={1}
32-
className='w-100 bn code black-70 ph0 mb2 input-reset'
32+
className="w-100 bn code black-70 ph0 mb2 input-reset"
3333
value={this.state.html}
3434
onChange={this.handleChange}
3535
/>
36-
<div
37-
className='sans-serif'
36+
<div
37+
className="sans-serif"
3838
dangerouslySetInnerHTML={{
3939
__html: he.decode(this.state.html)
4040
}}
4141
/>
42-
</div>
43-
)
44-
}
42+
</div>
43+
)
44+
}
4545
}
4646

4747
export default Editor

docs/ui/Layout.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import { version } from '../package.json'
44
import Header from './Header'
55
import Footer from './Footer'
66

7-
export default ({ title = 'TACHYONS - Css Toolkit', className = '', children }) => (
7+
export default ({
8+
title = 'TACHYONS - Css Toolkit',
9+
className = '',
10+
children
11+
}) => (
812
<div className="w-100 sans-serif">
913
<title>{title}</title>
1014
<link
@@ -13,9 +17,6 @@ export default ({ title = 'TACHYONS - Css Toolkit', className = '', children })
1317
/>
1418

1519
<Header version={version} />
16-
<main
17-
className={className}
18-
children={children}
19-
/>
20+
<main className={className} children={children} />
2021
</div>
2122
)

docs/ui/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ export const TitleLink = ({ href = '#!', subtext, text, ...props }) => (
3333
)
3434

3535
export const md = {
36-
h1: props => <h1 className='f6 ttu tracked mt0' {...props} />,
37-
h2: props => <h2 className='f5 mt4 pb2 bb' {...props} />,
38-
h3: props => <h3 className='f5 mt4' {...props} />,
39-
p: props => <p className='measure f5 lh-copy' {...props} />,
40-
ul: props => <ul className='pl3' {...props} />,
41-
li: props => <li className='lh-copy ml2' {...props} />,
36+
h1: props => <h1 className="f6 ttu tracked mt0" {...props} />,
37+
h2: props => <h2 className="f5 mt4 pb2 bb" {...props} />,
38+
h3: props => <h3 className="f5 mt4" {...props} />,
39+
p: props => <p className="measure f5 lh-copy" {...props} />,
40+
ul: props => <ul className="pl3" {...props} />,
41+
li: props => <li className="lh-copy ml2" {...props} />,
4242
a: ({ href, ...props }) => (
4343
<Link href={href}>
44-
<a className='dim link blue' {...props} />
44+
<a className="dim link blue" {...props} />
4545
</Link>
4646
),
4747
code: Editor

docs/ui/withDocLayout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default Component => ({ title, ...props }) => (
1010
<ComponentsProvider components={md}>
1111
<Layout title={title}>
1212
<NavElements />
13-
<Container padding={true} className='black-70'>
13+
<Container padding={true} className="black-70">
1414
<Component {...props} />
1515
</Container>
1616
</Layout>

0 commit comments

Comments
 (0)