Skip to content

Commit

Permalink
Include stories/ in prettier script
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneLem committed Mar 16, 2020
1 parent b8fad36 commit 22ffd5b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"prepublishOnly": "npm run build",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"prettier": "prettier --write \"{src,scripts,test}/**/*.js\"",
"prettier:check": "prettier --check \"{src,scripts,test}/**/*.js\"",
"prettier": "prettier --write \"{src,scripts,test,stories}/**/*.js\"",
"prettier:check": "prettier --check \"{src,scripts,test,stories}/**/*.js\"",
"prepare": "npm run build:dist"
},
"size-limit": [
Expand Down
28 changes: 13 additions & 15 deletions stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ import {
color,
} from '@storybook/addon-knobs'

import { Picker, Emoji, emojiIndex, NimbleEmojiIndex, getEmojiDataFromNative } from '../dist'
import {
Picker,
Emoji,
emojiIndex,
NimbleEmojiIndex,
getEmojiDataFromNative,
} from '../dist'
import data from '../data/all.json'
import '../css/emoji-mart.css'

Expand All @@ -31,9 +37,9 @@ const CUSTOM_EMOJIS = [
},
]

const CUSTOM_EMOJIS_WITH_CATEGORIES = CUSTOM_EMOJIS.map(emoji => {
const CUSTOM_EMOJIS_WITH_CATEGORIES = CUSTOM_EMOJIS.map((emoji) => {
return Object.assign({}, emoji, {
customCategory: emoji.name === 'Squirrel' ? 'Mammals' : 'Mollusks'
customCategory: emoji.name === 'Squirrel' ? 'Mammals' : 'Mollusks',
})
})

Expand Down Expand Up @@ -70,9 +76,7 @@ storiesOf('Picker', module)
))

.add('Custom categories', () => (
<Picker
custom={CUSTOM_EMOJIS_WITH_CATEGORIES}
/>
<Picker custom={CUSTOM_EMOJIS_WITH_CATEGORIES} />
))

.add('Custom category icons', () => (
Expand Down Expand Up @@ -274,14 +278,10 @@ storiesOf('Get emoji data from Native', module)
const emojiData = getEmojiDataFromNative(
text('Unicode', '🏋🏿‍♂️'),
select('Emoji pack', SETS, SETS[0]),
data
data,
)
if (!emojiData) {
return (
<div>
Couldn`t find any emoji data from native...
</div>
)
return <div>Couldn`t find any emoji data from native...</div>
}

return (
Expand All @@ -293,9 +293,7 @@ storiesOf('Get emoji data from Native', module)
size={48}
/>

<pre>
emojiData: {JSON.stringify(emojiData, null, 2)}
</pre>
<pre>emojiData: {JSON.stringify(emojiData, null, 2)}</pre>
</div>
)
})

0 comments on commit 22ffd5b

Please sign in to comment.