From 9b55900dc4b58ae9c05de4f4e3a416e443eb8f85 Mon Sep 17 00:00:00 2001 From: ddcat1115 Date: Mon, 30 Oct 2017 14:57:17 +0800 Subject: [PATCH] fix button list rule --- src/components/PageHeader/demo/standard.md | 12 +++++++++--- src/components/PageHeader/index.less | 6 +++++- src/routes/Profile/AdvancedProfile.js | 15 ++++++++------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/components/PageHeader/demo/standard.md b/src/components/PageHeader/demo/standard.md index 3f9c2a81..e4330485 100644 --- a/src/components/PageHeader/demo/standard.md +++ b/src/components/PageHeader/demo/standard.md @@ -8,9 +8,10 @@ title: Standard ````jsx import PageHeader from 'ant-design-pro/lib/PageHeader'; import DescriptionList from 'ant-design-pro/lib/DescriptionList'; -import { Button, Menu, Icon, Row, Col } from 'antd'; +import { Button, Menu, Dropdown, Icon, Row, Col } from 'antd'; const { Description } = DescriptionList; +const ButtonGroup = Button.Group; const description = ( @@ -31,8 +32,13 @@ const menu = ( const action = (
- - + + + + + + +
); diff --git a/src/components/PageHeader/index.less b/src/components/PageHeader/index.less index c559441f..3b8b5fe3 100644 --- a/src/components/PageHeader/index.less +++ b/src/components/PageHeader/index.less @@ -118,10 +118,14 @@ .pageHeader { .action { :global { - .ant-btn-group, :not(.ant-btn-group) .ant-btn { + .ant-btn-group, .ant-btn { display: block; margin-bottom: 8px; } + .ant-btn-group > .ant-btn { + display: inline-block; + margin-bottom: 0; + } } } } diff --git a/src/routes/Profile/AdvancedProfile.js b/src/routes/Profile/AdvancedProfile.js index d97d71d2..80ce8a25 100644 --- a/src/routes/Profile/AdvancedProfile.js +++ b/src/routes/Profile/AdvancedProfile.js @@ -10,6 +10,7 @@ import styles from './AdvancedProfile.less'; const { Step } = Steps; const { Description } = DescriptionList; +const ButtonGroup = Button.Group; const getWindowWidth = () => (window.innerWidth || document.documentElement.clientWidth); @@ -23,13 +24,13 @@ const menu = ( const action = (
- - - - - + + + + + + +
); -- GitLab