浏览代码

Alert page edit

chenxixian 6 年之前
父节点
当前提交
3282abc27d
共有 2 个文件被更改,包括 24 次插入0 次删除
  1. 18 0
      Alert.jsx
  2. 6 0
      Alert.mdx

+ 18 - 0
Alert.jsx

@@ -26,3 +26,21 @@ Alert.propTypes = {
 Alert.defaultProps = {
   kind: 'info',
 }
+
+export function EditButton(props) {
+  let encodedStatus = encodeURIComponent(
+      "This live editor looks pretty darn handy #JavaScript"
+  )
+  let encodedURL = encodeURIComponent(
+      "https://ecs.chenxixian.cn/chenxixian/docz/src/master"
+  )
+
+  return (
+      <a
+          href={`https://ecs.chenxixian.cn/chenxixian/docz/_edit/master/ALert.mdx`}
+          target="_blank"
+          className="EditButton">
+        Edit This Page!
+      </a>
+  )
+}

+ 6 - 0
Alert.mdx

@@ -6,6 +6,12 @@ menu: Components
 import { Playground, Props } from 'docz'
 import { Alert } from './Alert'
 
+import { Button, EditButton} from './Alert'
+
+# Button
+<EditButton />
+
+
 # Alert
 
 ## Properties