Skip to content

Design Tokens - Wizard #2026

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

Merged
merged 2 commits into from
May 3, 2022
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
25 changes: 18 additions & 7 deletions src/components/wizard/WizardStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,27 @@ const exclamationSmall = require('./assets/exclamationSmall.png');
import {WizardStepsConfig} from './types';

export const StatesConfig: WizardStepsConfig = {
enabled: {color: Colors.grey30, circleColor: Colors.grey60, enabled: true},
disabled: {color: Colors.grey50, circleColor: Colors.grey60},
error: {color: Colors.red30, icon: exclamationSmall, enabled: true, accessibilityInfo: 'Validation Error'},
skipped: {color: Colors.red30, enabled: true, accessibilityInfo: 'Not completed'},
enabled: {color: Colors.$textNeutralHeavy, circleColor: Colors.$outlineDisabled, enabled: true},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enabled: {color: Colors.$textNeutralHeavy, circleColor: Colors.$outlineDisabled, enabled: true},
enabled: {color: Colors.$textNeutralHeavy, circleColor: Colors.$outlineDefault, enabled: true},

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it changed to grey50 so you're using the $outlineDisabled token?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's set to $outlineNeutralMedium which is $outlineDisabled

disabled: {color: Colors.$textDisabled, circleColor: Colors.$outlineDefault},
error: {
color: Colors.$iconDangerLight,
circleColor: Colors.$outlineDanger,
icon: exclamationSmall,
enabled: true,
accessibilityInfo: 'Validation Error'
},
skipped: {
color: Colors.$textDangerLight,
circleColor: Colors.$outlineDanger,
enabled: true,
accessibilityInfo: 'Not completed'
},
completed: {
color: Colors.grey30,
circleColor: Colors.grey60,
color: Colors.$iconNeutral,
circleColor: Colors.$outlineDisabled,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
circleColor: Colors.$outlineDisabled,
circleColor: Colors.$outlineDefault,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it changed to grey50 so you're using the $outlineDisabled token?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's set to $outlineNeutralMedium which is $outlineDisabled

icon: checkMarkSmall,
enabled: true,
accessibilityInfo: 'Completed'
},
active: {color: Colors.blue10, circleColor: Colors.blue10}
active: {color: Colors.$textPrimary, circleColor: Colors.$outlinePrimary}
};
4 changes: 2 additions & 2 deletions src/components/wizard/WizardStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default asBaseComponent<WizardStepProps>(WizardStep);
const styles = StyleSheet.create({
connector: {
borderWidth: 0.5,
borderColor: Colors.grey60
borderColor: Colors.$outlineDisabled
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it changed to grey50 so you're using the $outlineDisabled token?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See other comments :)

},
circle: {
width: 24,
Expand All @@ -130,6 +130,6 @@ const styles = StyleSheet.create({
},
label: {
marginHorizontal: 8,
color: Colors.grey20
color: Colors.$textNeutralHeavy
}
});
15 changes: 5 additions & 10 deletions src/components/wizard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {Component} from 'react';
import {StyleSheet, Platform} from 'react-native';
import {StyleSheet} from 'react-native';
import View from '../view';
import {Constants, asBaseComponent} from '../../commons/new';
import Colors from '../../style/colors';
Expand Down Expand Up @@ -103,19 +103,14 @@ export default asBaseComponent<WizardProps, typeof Wizard>(Wizard);

const styles = StyleSheet.create({
container: {
backgroundColor: Colors.white,
backgroundColor: Colors.$backgroundElevated,
paddingVertical: 10,
paddingHorizontal: 15,
flexDirection: 'row',
justifyContent: 'space-between',
width: '100%',
...Platform.select({
ios: {
...Shadows.white30.bottom
},
android: {
elevation: 2
}
})
...Shadows.sh10.bottom,
borderBottomWidth: 1,
borderBottomColor: Colors.$outlineDisabled
}
});