mirror of
https://github.com/zhigang1992/docz.git
synced 2026-04-26 06:06:00 +08:00
chore: update example basic
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
"start": "playgrodd start"
|
||||
},
|
||||
"dependencies": {
|
||||
"playgrodd": "0.0.0"
|
||||
"playgrodd": "^0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-preset-react": "^6.24.1"
|
||||
}
|
||||
}
|
||||
|
||||
8
examples/basic/src/Alert.jsx
Normal file
8
examples/basic/src/Alert.jsx
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* @playgrodd
|
||||
* @name: Alert
|
||||
*/
|
||||
|
||||
import React from 'react'
|
||||
|
||||
export const doc = () => <div>hello</div>
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* @playgrodd
|
||||
* @name: Button
|
||||
*/
|
||||
|
||||
import React from 'react'
|
||||
import { doc } from 'playgrodd'
|
||||
import { Button } from './Button'
|
||||
|
||||
doc(() => <Button>Click me</Button>)
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @playgrodd
|
||||
* @name: Button
|
||||
*/
|
||||
|
||||
import React from 'react'
|
||||
|
||||
export const Button = ({ children }) => <button>{children}</button>
|
||||
export const doc = () => <button>click me</button>
|
||||
|
||||
Reference in New Issue
Block a user