diff --git a/src/fab/_example/index.jsx b/src/fab/_example/index.jsx
index 2ad97ce8..0146d2e5 100644
--- a/src/fab/_example/index.jsx
+++ b/src/fab/_example/index.jsx
@@ -1,10 +1,15 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { Button } from 'tdesign-mobile-react';
import TDemoBlock from '../../../site/mobile/components/DemoBlock';
import TDemoHeader from '../../../site/mobile/components/DemoHeader';
import './style/index.less';
import BaseDemo from './display';
+import TextDemo from './text';
export default function FabDemo() {
+ const [type, setType] = useState('base');
+
+ const changeType = (type) => setType(type);
return (
-
+
+ -
+
+
+ -
+
+
+
+ {type === 'base' ?
:
}
);
}
diff --git a/src/fab/_example/style/index.less b/src/fab/_example/style/index.less
index 1997f877..3a5b1b2b 100644
--- a/src/fab/_example/style/index.less
+++ b/src/fab/_example/style/index.less
@@ -1,3 +1,18 @@
.tdesign-mobile-demo {
background-color: #f6f6f6;
}
+
+.fab-container {
+ li {
+ display: flex;
+ justify-content: center;
+ margin-bottom: 12px;
+
+ .fab-btn {
+ width: 350px;
+ border: 1px solid #dcdcdc;
+ color: #000;
+ font-size: 16px;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/fab/_example/text.jsx b/src/fab/_example/text.jsx
index b8f262aa..35d5110f 100644
--- a/src/fab/_example/text.jsx
+++ b/src/fab/_example/text.jsx
@@ -8,7 +8,13 @@ export default function () {
};
return (
<>
- } text="按钮文字" style={{ right: '16px', bottom: '32px' }} onClick={onClick} />
+ }
+ text="按钮文字"
+ style={{ right: '16px', bottom: '32px' }}
+ buttonProps={{ variant: 'outline' }}
+ onClick={onClick}
+ />
>
);
}