forked from signalapp/Signal-Desktop
-
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
1 parent
2df1ba6
commit 11d47a8
Showing
123 changed files
with
11,203 additions
and
1,630 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,8 @@ | ||
module.exports = { | ||
presets: ['@babel/preset-react', '@babel/preset-typescript'], | ||
plugins: [ | ||
'react-hot-loader/babel', | ||
'lodash', | ||
'@babel/plugin-proposal-class-properties', | ||
], | ||
}; |
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
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,2 @@ | ||
import '@storybook/addon-knobs/register'; | ||
import '@storybook/addon-actions/register'; |
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,37 @@ | ||
import * as React from 'react'; | ||
import { addDecorator, configure } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import classnames from 'classnames'; | ||
import * as styles from './styles.scss'; | ||
import messages from '../_locales/en/messages.json'; | ||
import { I18n } from '../sticker-creator/util/i18n'; | ||
|
||
addDecorator(withKnobs); | ||
|
||
addDecorator((storyFn /* , context */) => { | ||
const contents = storyFn(); | ||
|
||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.panel}>{contents}</div> | ||
<div className={classnames(styles.darkTheme, styles.panel, 'dark-theme')}> | ||
{contents} | ||
</div> | ||
</div> | ||
); | ||
}); | ||
|
||
// Hack to enable hooks in stories: https://github.com/storybookjs/storybook/issues/5721#issuecomment-473869398 | ||
addDecorator(Story => <Story />); | ||
|
||
addDecorator(story => <I18n messages={messages}>{story()}</I18n>); | ||
|
||
configure(() => { | ||
// Load sticker creator stories | ||
const stickerCreatorContext = require.context( | ||
'../sticker-creator', | ||
true, | ||
/\.stories\.tsx?$/ | ||
); | ||
stickerCreatorContext.keys().forEach(f => stickerCreatorContext(f)); | ||
}, module); |
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,2 @@ | ||
<!-- prettier-ignore --> | ||
<link rel="stylesheet" href="../stylesheets/manifest_bridge.css" /> |
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,21 @@ | ||
.container { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: stretch; | ||
align-content: stretch; | ||
width: 100vw; | ||
height: 100vh; | ||
} | ||
|
||
.panel { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-around; | ||
align-items: center; | ||
padding: 16px; | ||
} | ||
|
||
.dark-theme { | ||
background-color: #17191d; | ||
} |
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 @@ | ||
module.exports = ({ config }) => { | ||
config.entry.unshift( | ||
'!!style-loader!css-loader!sanitize.css', | ||
'!!style-loader!css-loader!typeface-inter' | ||
); | ||
|
||
config.module.rules.unshift( | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'babel-loader', | ||
}, | ||
{ | ||
test: /\.scss$/, | ||
loaders: [ | ||
'style-loader', | ||
'css-loader?modules=true&localsConvention=camelCaseOnly', | ||
'sass-loader', | ||
], | ||
} | ||
); | ||
|
||
config.resolve.extensions = ['.tsx', '.ts', '.jsx', '.js']; | ||
|
||
return config; | ||
}; |
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
Oops, something went wrong.