Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bold style for switch labels in workflow and more features pages #43006

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceMoreFeaturesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro
<ToggleSettingOptionRow
icon={item.icon}
title={translate(item.titleTranslationKey)}
titleStyle={styles.textStrong}
subtitle={translate(item.subtitleTranslationKey)}
switchAccessibilityLabel={translate(item.subtitleTranslationKey)}
isActive={item.isActive}
Expand Down
7 changes: 5 additions & 2 deletions src/pages/workspace/workflows/ToggleSettingsOptionRow.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useMemo} from 'react';
import {View} from 'react-native';
import type {StyleProp, ViewStyle} from 'react-native';
import type {StyleProp, TextStyle, ViewStyle} from 'react-native';
import Icon from '@components/Icon';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import Switch from '@components/Switch';
Expand All @@ -22,6 +22,8 @@ type ToggleSettingOptionRowProps = {
shouldPlaceSubtitleBelowSwitch?: boolean;
/** Used to apply styles to the outermost container */
wrapperStyle?: StyleProp<ViewStyle>;
/** Used to apply styles to the Title */
titleStyle?: StyleProp<TextStyle>;
/** Whether the option is enabled or not */
isActive: boolean;
/** Callback to be called when the switch is toggled */
Expand Down Expand Up @@ -49,6 +51,7 @@ function ToggleSettingOptionRow({
switchAccessibilityLabel,
shouldPlaceSubtitleBelowSwitch,
wrapperStyle,
titleStyle,
onToggle,
subMenuItems,
isActive,
Expand Down Expand Up @@ -85,7 +88,7 @@ function ToggleSettingOptionRow({
/>
)}
<View style={[styles.flexColumn, styles.flex1]}>
<Text style={[styles.textNormal, styles.lh20]}>{title}</Text>
<Text style={[styles.textNormal, styles.lh20, titleStyle]}>{title}</Text>
{!shouldPlaceSubtitleBelowSwitch && subtitle && subTitleView}
</View>
</View>
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ function WorkspaceWorkflowsPage({policy, betas, route}: WorkspaceWorkflowsPagePr
<ToggleSettingOptionRow
icon={item.icon}
title={item.title}
titleStyle={styles.textStrong}
subtitle={item.subtitle}
switchAccessibilityLabel={item.switchAccessibilityLabel}
onToggle={item.onToggle}
Expand Down
Loading