-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Convert the Persona component to module CSS. #1067
Conversation
@@ -16,46 +17,46 @@ describe('Persona', () => { | |||
|
|||
it('renders with expected initialsColor if none was provided', () => { | |||
const wrapper = shallow(<Persona primaryText='Kat Larrson' />); | |||
let result = wrapper.find('.ms-Persona-initials--red'); | |||
let result = wrapper.find('.' + styles.isRootInitialsRed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a state but a variant, so use rootInitialsRed, or rootInitialsAreRed. Also 'is initials' isn't proper grammar.
expect(result).to.have.length(1); | ||
|
||
const wrapper2 = shallow(<Persona primaryText='Annie Lindqvist' />); | ||
result = wrapper2.find('.ms-Persona-initials--darkRed'); | ||
result = wrapper2.find('.' + styles.isRootInitialsDarkRed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rootInitialsDarkRed
expect(result).to.have.length(1); | ||
}); | ||
|
||
it('uses provided initialsColor if one was specified', () => { | ||
const wrapper = shallow(<Persona primaryText='Kat Larrson' initialsColor={ PersonaInitialsColor.lightBlue } />); | ||
let result = wrapper.find('.ms-Persona-initials--lightBlue'); | ||
let result = wrapper.find('.' + styles.isRootInitialsLightBlue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rootInitialsLightBlue
[PersonaInitialsColor.orange]: 'ms-Persona-initials--orange', | ||
[PersonaInitialsColor.red]: 'ms-Persona-initials--red', | ||
[PersonaInitialsColor.darkRed]: 'ms-Persona-initials--darkRed' | ||
[PersonaInitialsColor.lightBlue]: 'ms-Persona-initials--lightBlue ' + styles.isRootInitialsLightBlue, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find 'isRoot' and replace with 'root' :)
fixes made in #1109 |
Pull request checklist
Focus areas to test