import React from 'react'
import { Avatar, Card, IconSprite, Theme } from 'devsy-components'

const sample = [{
  fullname: 'Miguel Ángel',
  username: '@midudev',
  avatar: 'http://gravatar.com/avatar/ab1d28e0c265caf52e6f22b4b1e2ac98',
  message: 'This is an example of tweet mesage talking about code.',
  snippet: {
    language: 'python',
    code: `def openFile(path):
    file = open(path, "r")
    content = file.read()
    file.close()
    return content`
  }
}, {
  fullname: 'Miguel Ángel',
  username: '@midudev',
  avatar: 'http://gravatar.com/avatar/ab1d28e0c265caf52e6f22b4b1e2ac98',
  message: 'This is an example of tweet mesage talking about code.',
  snippet: {
    language: 'python',
    code: `def openFile(path):
    file = open(path, "r")
    content = file.read()
    file.close()
    return content`
  }
}, {
  fullname: 'Miguel Ángel',
  username: '@midudev',
  avatar: 'http://gravatar.com/avatar/ab1d28e0c265caf52e6f22b4b1e2ac98',
  message: 'This is an example of tweet mesage talking about code.',
  snippet: {
    language: 'python',
    code: `def openFile(path):
    file = open(path, "r")
    content = file.read()
    file.close()
    return content`
  }
}, {
  fullname: 'Miguel Ángel',
  username: '@midudev',
  avatar: 'http://gravatar.com/avatar/ab1d28e0c265caf52e6f22b4b1e2ac98',
  message: 'This is an example of tweet mesage talking about code.',
  snippet: {
    language: 'python',
    code: `def openFile(path):
    file = open(path, "r")
    content = file.read()
    file.close()
    return content`
  }
}]

export default () => {
  return (
    <Theme>
      <h4>Avatars</h4>
      <h5>wiht image</h5>
      <Avatar image='https://s3.amazonaws.com/uifaces/faces/twitter/zeldman/128.jpg' size='xs' />
      <Avatar image='https://s3.amazonaws.com/uifaces/faces/twitter/rem/128.jpg' size='s' />
      <Avatar image='https://s3.amazonaws.com/uifaces/faces/twitter/brad_frost/128.jpg' size='m' />
      <Avatar image='https://s3.amazonaws.com/uifaces/faces/twitter/brynn/128.jpg' size='l' />
      <Avatar image='https://s3.amazonaws.com/uifaces/faces/twitter/esthercrawford/128.jpg' size='xl' />
      <h5>with initials</h5>
      <Avatar initials='WK' size='xs' />
      <Avatar initials='MD' size='s' />
      <Avatar initials='DC' size='m' />
      <Avatar initials='DA' size='l' />
      <Avatar initials='AZ' size='xl' />
      <h4>Cards</h4>
      {sample.map((tweet, index) => <Card {...tweet} key={index} />)}
      <IconSprite />
    </Theme>
  )
}

@@ -359,36 +359,32 @@
 openFile(path):%0A
-    
 file = open(path
@@ -382,36 +382,32 @@
 open(path, %22r%22)%0A
-    
 content = file.r
@@ -404,36 +404,32 @@
 t = file.read()%0A
-    
 file.close()%0A   
@@ -417,36 +417,32 @@
 ()%0Afile.close()%0A
-    
 return content%60%0A
@@ -459,36 +459,31 @@
  fullname: '
-Miguel %C3%81ngel
+Zeldman
 ',%0A  usernam
@@ -479,39 +479,39 @@
 ,%0A  username: '@
-midudev
+zedlman
 ',%0A  avatar: 'ht
@@ -516,493 +516,120 @@
 http
+s
 ://
-gravatar.com/avatar/ab1d28e0c265caf52e6f22b4b1e2ac98',%0A  message: 'This is an example of tweet mesage talking about code.',%0A  snippet: %7B%0A    language: 'python',%0A    code: %60def openFile(path):%0A    file = open(path, %22r%22)%0A    content = file.read()%0A    file.close()%0A    return content%60%0A  %7D%0A%7D, %7B%0A  fullname: 'Miguel %C3%81ngel',%0A  username: '@midudev',%0A  avatar: 'http://gravatar.com/avatar/ab1d28e0c265caf52e6f22b4b1e2ac98',%0A  message: 'This is an example of tweet mesage
+s3.amazonaws.com/uifaces/faces/twitter/zeldman/128.jpg',%0A  message: 'Javascript code to
  talk
-ing
  about
- code.
+! Amazing!
 ',%0A 
@@ -647,38 +647,34 @@
 %0A    language: '
-python
+js
 ',%0A    code: %60de
@@ -675,477 +675,90 @@
 e: %60
-def openFile(path):%0A    file = open(path, %22r%22)%0A    content = file.read()%0A    file.close()%0A    return content%60%0A  %7D%0A%7D, %7B%0A  fullname: 'Miguel %C3%81ngel',%0A  username: '@midudev',%0A  avatar: 'http://gravatar.com/avatar/ab1d28e0c265caf52e6f22b4b1e2ac98',%0A  message: 'This is an example of tweet mesage talking about code.',%0A  snippet: %7B%0A    language: 'python',%0A    code: %60def openFile(path):%0A    file = open(path, %22r%22)%0A    content = file.read()%0A    file.close()%0A    return content
+var foo = 'bar'%0Aconst sum = (a, b) =%3E a + b;%0Aconst total = sum(1, 3);%0Areturn total
 %60%0A  

Improve example