UI Conversion: Switched ButtonGroup to Radio
Summary: Switched button group to Ant's radio buttons Reviewed By: mweststrate Differential Revision: D28068173 fbshipit-source-id: bcde8f32d76f76c18cf8bc8c8742bc3e01c54c7c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f743bd68a1
commit
1a315c510e
@@ -7,8 +7,9 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {Button, ButtonGroup, Glyph, colors} from 'flipper';
|
||||
import {Radio} from 'antd';
|
||||
import React from 'react';
|
||||
import {LeftOutlined, RightOutlined} from '@ant-design/icons';
|
||||
|
||||
export default React.memo(
|
||||
(props: {
|
||||
@@ -22,30 +23,14 @@ export default React.memo(
|
||||
onForward: () => void;
|
||||
}) => {
|
||||
return (
|
||||
<ButtonGroup>
|
||||
<Button disabled={!props.canGoBack} onClick={props.onBack}>
|
||||
<Glyph
|
||||
name="chevron-left"
|
||||
size={16}
|
||||
color={
|
||||
props.canGoBack
|
||||
? colors.macOSTitleBarIconActive
|
||||
: colors.macOSTitleBarIconBlur
|
||||
}
|
||||
/>
|
||||
</Button>
|
||||
<Button disabled={!props.canGoForward} onClick={props.onForward}>
|
||||
<Glyph
|
||||
name="chevron-right"
|
||||
size={16}
|
||||
color={
|
||||
props.canGoForward
|
||||
? colors.macOSTitleBarIconActive
|
||||
: colors.macOSTitleBarIconBlur
|
||||
}
|
||||
/>
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
<Radio.Group style={{marginLeft: 5, marginRight: 5}}>
|
||||
<Radio.Button disabled={!props.canGoBack} onClick={props.onBack}>
|
||||
<LeftOutlined size={16} />
|
||||
</Radio.Button>
|
||||
<Radio.Button disabled={!props.canGoForward} onClick={props.onForward}>
|
||||
<RightOutlined size={16} />
|
||||
</Radio.Button>
|
||||
</Radio.Group>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user