2018-05-22 19:44:40 +00:00
|
|
|
// @flow
|
|
|
|
|
2022-08-25 11:35:19 +00:00
|
|
|
import { ColorPalette } from '../../../styles';
|
|
|
|
import BaseTheme from '../../../ui/components/BaseTheme';
|
2018-09-11 10:16:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The default color of the {@code Label} and {@code ExpandedLabel}.
|
|
|
|
*/
|
2021-04-08 08:35:26 +00:00
|
|
|
export const DEFAULT_COLOR = '#36383C';
|
2018-09-11 10:16:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Margin of the {@Label} - to be reused when rendering the
|
|
|
|
* {@code ExpandedLabel}.
|
|
|
|
*/
|
2021-04-08 08:35:26 +00:00
|
|
|
export const LABEL_MARGIN = 8;
|
2018-09-11 10:16:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Size of the {@Label} - to be reused when rendering the
|
|
|
|
* {@code ExpandedLabel}.
|
|
|
|
*/
|
2021-04-08 08:35:26 +00:00
|
|
|
export const LABEL_SIZE = 28;
|
2018-05-22 19:44:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The styles of the native base/label feature.
|
|
|
|
*/
|
2020-05-18 11:54:55 +00:00
|
|
|
export default {
|
2021-04-08 08:35:26 +00:00
|
|
|
expandedLabelContainer: {
|
|
|
|
position: 'absolute',
|
|
|
|
left: 0,
|
|
|
|
right: 0,
|
|
|
|
top: 36,
|
|
|
|
flexDirection: 'row',
|
2022-01-13 12:15:53 +00:00
|
|
|
justifyContent: 'center',
|
|
|
|
zIndex: 1
|
2018-09-11 10:16:01 +00:00
|
|
|
},
|
|
|
|
|
2021-04-08 08:35:26 +00:00
|
|
|
expandedLabelTextContainer: {
|
|
|
|
borderRadius: 3,
|
|
|
|
paddingHorizontal: LABEL_MARGIN,
|
|
|
|
paddingVertical: LABEL_MARGIN / 2
|
2018-09-11 10:16:01 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
expandedLabelText: {
|
|
|
|
color: ColorPalette.white
|
|
|
|
},
|
|
|
|
|
2018-05-22 19:44:40 +00:00
|
|
|
/**
|
|
|
|
* The outermost view.
|
|
|
|
*/
|
2021-04-08 08:35:26 +00:00
|
|
|
labelContainer: {
|
|
|
|
alignItems: 'space-between',
|
2018-09-11 10:16:01 +00:00
|
|
|
backgroundColor: DEFAULT_COLOR,
|
2021-04-08 08:35:26 +00:00
|
|
|
borderRadius: 3,
|
2018-05-22 19:44:40 +00:00
|
|
|
flex: 0,
|
2018-09-11 10:16:01 +00:00
|
|
|
height: LABEL_SIZE,
|
2018-05-22 19:44:40 +00:00
|
|
|
justifyContent: 'center',
|
2021-04-08 08:35:26 +00:00
|
|
|
marginLeft: LABEL_MARGIN,
|
|
|
|
marginBottom: LABEL_MARGIN,
|
|
|
|
paddingHorizontal: 8
|
2020-05-18 11:54:55 +00:00
|
|
|
},
|
|
|
|
|
2021-04-08 08:35:26 +00:00
|
|
|
labelText: {
|
2018-05-22 19:44:40 +00:00
|
|
|
color: ColorPalette.white,
|
2022-01-13 12:15:53 +00:00
|
|
|
...BaseTheme.typography.labelBold
|
2018-09-11 10:16:01 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
labelOff: {
|
|
|
|
opacity: 0.3
|
2018-05-22 19:44:40 +00:00
|
|
|
}
|
2020-05-18 11:54:55 +00:00
|
|
|
};
|