Skip to content

Commit

Permalink
fix: minor updates to settings ui to match updates from design
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnyhoward committed Jan 6, 2025
1 parent e9c51d6 commit 42d892b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/components/UI/SettingsDrawer/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ describe('SettingsDrawer', () => {

describe('SettingsDrawer', () => {
it('should render correctly', () => {
process.env.MM_SETTINGS_REDESIGN_ENABLE = 'false';
process.env.MM_SETTINGS_REDESIGN_ENABLED = 'false';
const { toJSON } = render(<SettingsDrawer {...originalProps} />);
expect(toJSON()).toMatchSnapshot();
});
it('should render with redesign enabled', () => {
process.env.MM_SETTINGS_REDESIGN_ENABLE = 'true';
process.env.MM_SETTINGS_REDESIGN_ENABLED = 'true';
const { toJSON } = render(<SettingsDrawer {...redesignProps} />);
expect(toJSON()).toMatchSnapshot();
});
Expand Down
9 changes: 4 additions & 5 deletions app/components/UI/SettingsDrawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ import { Colors } from '../../../util/theme/models';
import { SettingsDrawerProps } from './index.types';

const isSettingsRedesignEnabled =
process.env.MM_SETTINGS_REDESIGN_ENABLE === 'true';
process.env.MM_SETTINGS_REDESIGN_ENABLED === 'true';

const createStyles = (
colors: Colors,
{ isFirst, isLast }: { isFirst: boolean; isLast: boolean },
) =>
StyleSheet.create({
root: {
backgroundColor: isSettingsRedesignEnabled
? colors.background.alternative
: colors.background.default,
backgroundColor: colors.background.default,
padding: 16,
...(isFirst && { borderTopLeftRadius: 8, borderTopRightRadius: 8 }),
...(!isFirst && {
Expand Down Expand Up @@ -70,7 +68,7 @@ const createStyles = (
},
separator: {
borderTopWidth: 1,
borderTopColor: colors.primary.inverse,
borderTopColor: colors.background.alternative,
},
});

Expand Down Expand Up @@ -143,6 +141,7 @@ const SettingsDrawer: React.FC<SettingsDrawerProps> = ({
</ListItemColumn>
)}
</ListItem>
{!isLast && <View style={styles.separator} />}
</TouchableOpacity>
);
};
Expand Down

0 comments on commit 42d892b

Please sign in to comment.