Skip to content

Commit

Permalink
styles: Update Switch colors and spinning-progress image.
Browse files Browse the repository at this point in the history
This changes both the thumbColor and trackColor of the ZulipSwitch
component, as the previous thumbColor was the default one, but it
matched with the old colors eliminating the need of passing a thumb-
Color prop.

Also, the spinning-image is updated to use blue color (the same color
used in the logo but with different alpha values) instead of green.
  • Loading branch information
im-adithya authored and chrisbobbe committed Apr 6, 2021
1 parent 58f6f73 commit d195454
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/common/ZulipSwitch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* @flow strict-local */
import React, { PureComponent } from 'react';
import { Switch } from 'react-native';
import Color from 'color';
import { BRAND_COLOR } from '../styles';

type Props = $ReadOnly<{|
Expand All @@ -24,14 +25,16 @@ export default class ZulipSwitch extends PureComponent<Props> {

render() {
const { disabled, onValueChange, value } = this.props;

return (
<Switch
value={value}
trackColor={{
false: 'hsl(0, 0%, 86%)',
true: BRAND_COLOR,
true: Color(BRAND_COLOR)
.fade(0.7)
.toString(),
}}
thumbColor={value ? BRAND_COLOR : '#f1f1f1'}
onValueChange={onValueChange}
disabled={disabled}
/>
Expand Down
Binary file modified static/img/spinning-progress.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d195454

Please sign in to comment.