use all caps for constants

This commit is contained in:
Jason Frerich
2022-10-25 08:50:56 -05:00
parent c7e4dc992d
commit 3715c5cbbe
2 changed files with 8 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ import {useTheme} from '@context/theme';
import Button from '@screens/bottom_sheet/button';
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
import SelectedUser, {UserChipBottomMargin, UserChipHeight} from './selected_user';
import SelectedUser, {USER_CHIP_BOTTOM_MARGIN, USER_CHIP_HEIGHT} from './selected_user';
type Props = {
@@ -55,7 +55,8 @@ type Props = {
buttonText: string;
}
const MaxRows = 3;
const MAX_ROWS = 3;
const getStyleFromTheme = makeStyleSheetFromTheme((theme) => {
return {
container: {
@@ -81,7 +82,7 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => {
},
containerUsers: {
marginTop: 20,
maxHeight: (UserChipHeight + UserChipBottomMargin) * MaxRows,
maxHeight: (USER_CHIP_HEIGHT + USER_CHIP_BOTTOM_MARGIN) * MAX_ROWS,
},
users: {
alignItems: 'flex-start',

View File

@@ -38,8 +38,8 @@ type Props = {
testID?: string;
}
export const UserChipHeight = 32;
export const UserChipBottomMargin = 8;
export const USER_CHIP_HEIGHT = 32;
export const USER_CHIP_BOTTOM_MARGIN = 8;
const getStyleFromTheme = makeStyleSheetFromTheme((theme) => {
return {
@@ -48,9 +48,9 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => {
justifyContent: 'center',
flexDirection: 'row',
borderRadius: 16,
height: UserChipHeight,
height: USER_CHIP_HEIGHT,
backgroundColor: changeOpacity(theme.centerChannelColor, 0.08),
marginBottom: UserChipBottomMargin,
marginBottom: USER_CHIP_BOTTOM_MARGIN,
marginRight: 8,
paddingHorizontal: 7,
},