Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Nov 23, 2020
1 parent c25d5b0 commit 2b7294f
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions stories/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, {Fragment} from 'react'
import {storiesOf} from '@storybook/react'
import React, { Fragment } from 'react'
import { storiesOf } from '@storybook/react'
import NanoClamp from '../src/index'

const string =
'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Incidunt, dignissimos totam nam cumque ipsum autem placeat. Doloribus nesciunt id saepe quasi, quod, quis voluptatibus rerum at perspiciatis impedit ab nostrum.'

const NanoClampWrap = ({background, width, ...props}) => (
const NanoClampWrap = ({ background, width, ...props }) => (
<div
style={{
width,
Expand Down Expand Up @@ -47,13 +47,27 @@ const examples = [

storiesOf('NanoClamp', module)
.add('default', () => (
<Fragment>{examples.map(({...props}) => <NanoClampWrap {...props} />)}</Fragment>
<>
{examples.map(({ ...props }) => (
<NanoClampWrap key={'default__' + JSON.stringify(props)} {...props} />
))}
</>
))
.add('with ellipsis prop', () => (
<Fragment>
{examples.map(({...props}) => <NanoClampWrap {...props} ellipsis=" [Read more...]" />)}
</Fragment>
<>
{examples.map(({ ...props }) => (
<NanoClampWrap
key={'ellipsis__' + JSON.stringify(props)}
{...props}
ellipsis=' [Read more...]'
/>
))}
</>
))
.add('with is prop', () => (
<Fragment>{examples.map(({...props}) => <NanoClampWrap {...props} is="h1" />)}</Fragment>
<>
{examples.map(({ ...props }) => (
<NanoClampWrap key={'custom__' + JSON.stringify(props)} {...props} is='h1' />
))}
</>
))

0 comments on commit 2b7294f

Please sign in to comment.