jiti-meet/react/features/toolbox/components/native/styles.js

127 lines
2.8 KiB
JavaScript
Raw Normal View History

2018-05-16 21:49:03 +00:00
// @flow
import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';
2018-06-14 09:14:32 +00:00
import { HANGUP_BUTTON_SIZE } from '../../constants';
2018-05-16 21:49:03 +00:00
// Toolbox, toolbar:
/**
* The style of toolbar buttons.
*/
const toolbarButton = {
backgroundColor: schemeColor('button'),
borderRadius: 20,
borderWidth: 0,
flex: 0,
flexDirection: 'row',
height: 40,
justifyContent: 'center',
2018-05-18 19:35:58 +00:00
// XXX We probably tested BoxModel.margin and discovered it to be too small
// for our taste.
marginHorizontal: 7,
width: 40
};
/**
* The icon style of the toolbar buttons.
*/
const toolbarButtonIcon = {
alignSelf: 'center',
color: ColorPalette.darkGrey,
fontSize: 22
};
/**
* The style of toolbar buttons which display white icons.
*/
const whiteToolbarButton = {
...toolbarButton,
backgroundColor: schemeColor('buttonToggled')
};
/**
* The icon style of toolbar buttons which display white icons.
*/
const whiteToolbarButtonIcon = {
...toolbarButtonIcon,
color: ColorPalette.white
};
/**
* The Toolbox and toolbar related styles.
*/
const styles = createStyleSheet({
/**
* The style of the toolbar.
*/
toolbar: {
alignItems: 'center',
2016-12-12 19:49:23 +00:00
flexDirection: 'row',
flexGrow: 0,
2016-12-12 19:49:23 +00:00
justifyContent: 'center',
marginBottom: BoxModel.margin / 2,
paddingHorizontal: BoxModel.margin
},
/**
* The style of the root/top-level {@link Container} of {@link Toolbox}.
*/
toolbox: {
flexDirection: 'column',
flexGrow: 0
}
});
export default styles;
/**
* Color schemed styles for the @{Toolbox} component.
*/
ColorSchemeRegistry.register('Toolbox', {
/**
* Styles for buttons in the toolbar.
*/
buttonStyles: {
iconStyle: toolbarButtonIcon,
style: toolbarButton
},
/**
* Overrides to the standard styles that we apply to the chat button, as
* that behaves slightly differently to other buttons.
*/
chatButtonOverride: {
toggled: {
backgroundColor: ColorPalette.blue
}
},
hangupButtonStyles: {
iconStyle: whiteToolbarButtonIcon,
style: {
...toolbarButton,
backgroundColor: schemeColor('hangup'),
borderRadius: HANGUP_BUTTON_SIZE / 2,
height: HANGUP_BUTTON_SIZE,
width: HANGUP_BUTTON_SIZE
},
underlayColor: ColorPalette.buttonUnderlay
},
/**
* Styles for toggled buttons in the toolbar.
*/
toggledButtonStyles: {
iconStyle: whiteToolbarButtonIcon,
style: {
...whiteToolbarButton,
borderColor: schemeColor('buttonToggledBorder'),
borderWidth: 1
}
}
});