From ce40f427c3ed537ca4d4c7c59db84f42a39eea2c Mon Sep 17 00:00:00 2001 From: zhongyuan Date: Thu, 27 Oct 2022 10:09:01 +0800 Subject: [PATCH 1/3] docs(fab): update docs and demo --- src/fab/_example/index.jsx | 33 +++++++++++++++++++++++++++++-- src/fab/_example/style/index.less | 15 ++++++++++++++ src/fab/_example/text.jsx | 8 +++++++- 3 files changed, 53 insertions(+), 3 deletions(-) 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..b2d320f3 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} + /> ); } From 2827df4f7b62327a8ee5bd325ddb71710e6390c1 Mon Sep 17 00:00:00 2001 From: zhongyuan Date: Thu, 27 Oct 2022 11:29:16 +0800 Subject: [PATCH 2/3] fix(fab): delete style --- src/checkbox/_example/style/index.less | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/checkbox/_example/style/index.less b/src/checkbox/_example/style/index.less index 212e4a70..a9736a8b 100644 --- a/src/checkbox/_example/style/index.less +++ b/src/checkbox/_example/style/index.less @@ -1,8 +1,3 @@ .checkbox-demo { background-color: #fff; } - -.checkbox-size-space { - padding: 12px 16px; - margin-bottom: 16px; -} From ea1fce1ced06974967dae240b42cc586b8379d0d Mon Sep 17 00:00:00 2001 From: zhongyuan Date: Thu, 27 Oct 2022 15:04:26 +0800 Subject: [PATCH 3/3] docs(fab): fix fab cr --- src/fab/_example/text.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fab/_example/text.jsx b/src/fab/_example/text.jsx index b2d320f3..35d5110f 100644 --- a/src/fab/_example/text.jsx +++ b/src/fab/_example/text.jsx @@ -9,8 +9,8 @@ export default function () { return ( <> } - text="获取手机号" + icon={} + text="按钮文字" style={{ right: '16px', bottom: '32px' }} buttonProps={{ variant: 'outline' }} onClick={onClick}