forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: checkbox & radio in flex align (ant-design#30260)
* fix: checkbox & radio in flex align * rm only md * docs: Update doc * test: Update snapshot
- Loading branch information
Showing
7 changed files
with
387 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
order: 99 | ||
title: | ||
zh-CN: 同行布局 | ||
en-US: Same line | ||
debug: true | ||
--- | ||
|
||
## zh-CN | ||
|
||
同行布局 | ||
|
||
## en-US | ||
|
||
Same line | ||
|
||
```tsx | ||
import { Checkbox, Radio, Space } from 'antd'; | ||
|
||
const sharedStyle: React.CSSProperties = { | ||
border: '1px solid red', | ||
marginBottom: 16, | ||
}; | ||
|
||
ReactDOM.render( | ||
<div> | ||
<Space style={sharedStyle} align="center"> | ||
<Checkbox value="light" /> | ||
<div>Bamboo</div> | ||
<Checkbox value="little">Little</Checkbox> | ||
</Space> | ||
|
||
<Space style={sharedStyle} align="center"> | ||
<Radio value="light" /> | ||
<div>Bamboo</div> | ||
<Radio value="little">Little</Radio> | ||
</Space> | ||
|
||
<div | ||
style={{ | ||
...sharedStyle, | ||
display: 'flex', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<Checkbox value="light" /> | ||
<div>Bamboo</div> | ||
<Checkbox value="little">Little</Checkbox> | ||
</div> | ||
|
||
<div | ||
style={{ | ||
...sharedStyle, | ||
display: 'flex', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<Radio value="light" /> | ||
<div>Bamboo</div> | ||
<Radio value="little">Little</Radio> | ||
</div> | ||
</div>, | ||
mountNode, | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.