Skip to content

Commit

Permalink
Merge pull request #4 from one-react/dev
Browse files Browse the repository at this point in the history
docs: fix image url issue
  • Loading branch information
foryuki committed Nov 5, 2018
2 parents d4a0c6c + f36f0e5 commit ebba60b
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 4 additions & 0 deletions examples/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ module.exports = (baseConfig, env, defaultConfig) => {
]
})

if (env === 'production'.toUpperCase()) {
defaultConfig.output.publicPath = '/menu/'
}

defaultConfig.resolve.alias['or-menu'] = path.resolve(__dirname, '../../src')

defaultConfig.resolve.extensions.push('.ts', '.tsx')
Expand Down
Binary file removed examples/public/.DS_Store
Binary file not shown.
Binary file removed examples/public/images/.DS_Store
Binary file not shown.
20 changes: 16 additions & 4 deletions examples/stories/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ const subNav1 = (
<div>Sunset Collection</div>
</div>
<div className="item-wrapper">
<div className="image image-1" />
<div
className="image"
style={{ backgroundImage: `url(${require('./images/face.png')})` }}
/>
</div>
</div>
)
Expand Down Expand Up @@ -79,7 +82,10 @@ const subNav2 = (
<div>Grapefruit Candle</div>
</div>
<div className="item-wrapper">
<div className="image image-2" />
<div
className="image"
style={{ backgroundImage: `url(${require('./images/perfume.png')})` }}
/>
</div>
</div>
)
Expand Down Expand Up @@ -112,7 +118,10 @@ const subNav3 = (
<div>Sunset Collection</div>
</div>
<div className="item-wrapper">
<div className="image image-3" />
<div
className="image"
style={{ backgroundImage: `url(${require('./images/lip.png')})` }}
/>
</div>
</div>
)
Expand Down Expand Up @@ -143,7 +152,10 @@ const subNav4 = (
<div>Grapefruit Candle</div>
</div>
<div className="item-wrapper">
<div className="image image-4" />
<div
className="image"
style={{ backgroundImage: `url(${require('./images/ear.png')})` }}
/>
</div>
</div>
)
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
16 changes: 0 additions & 16 deletions examples/stories/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,6 @@
width: 144px;
height: 144px;
background-size: contain;

&.image-1 {
background-image: url('../public/images/face.png');
}

&.image-2 {
background-image: url('../public/images/perfume.png');
}

&.image-3 {
background-image: url('../public/images/lip.png');
}

&.image-4 {
background-image: url('../public/images/ear.png');
}
}
}
}
Expand Down

0 comments on commit ebba60b

Please sign in to comment.