blob: a9f1d09dee07cef6cc4407add2a23f7757029905 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import React from 'react';
import styled from 'styled-components';
import * as AppButton from './AppButton';
const SIDE_BUTTON_WIDTH = 50;
const ButtonRow = styled.div({
display: 'flex',
flexDirection: 'row',
});
const MainButton = styled.button({
display: 'flex',
flex: 1,
borderTopRightRadius: 0,
borderBottomRightRadius: 0,
});
const SideButton = styled.button({
display: 'flex',
borderTopLeftRadius: 0,
borderBottomLeftRadius: 0,
width: SIDE_BUTTON_WIDTH,
alignItems: 'center',
marginLeft: 1,
});
interface IMultiButtonProps {
mainButton: React.ComponentType<AppButton.IProps>;
sideButton: React.ComponentType<AppButton.IProps>;
}
export function MultiButton(props: IMultiButtonProps) {
return (
<ButtonRow>
<MainButton as={props.mainButton} textOffset={SIDE_BUTTON_WIDTH} />
<SideButton as={props.sideButton} />
</ButtonRow>
);
}
|