Avoid hardcoding branding in user onboarding (#9206)
* Avoid hardcoding branding in user onboarding * Make spotlight test more reliable
This commit is contained in:
parent
ef0ba77f14
commit
e8eefeb937
6 changed files with 52 additions and 37 deletions
|
@ -27,6 +27,9 @@ interface Props {
|
|||
}
|
||||
|
||||
export function UserOnboardingTask({ task, completed = false }: Props) {
|
||||
const title = typeof task.title === "function" ? task.title() : task.title;
|
||||
const description = typeof task.description === "function" ? task.description() : task.description;
|
||||
|
||||
return (
|
||||
<li className={classNames("mx_UserOnboardingTask", {
|
||||
"mx_UserOnboardingTask_completed": completed,
|
||||
|
@ -42,10 +45,10 @@ export function UserOnboardingTask({ task, completed = false }: Props) {
|
|||
id={`mx_UserOnboardingTask_${task.id}`}
|
||||
className="mx_UserOnboardingTask_content">
|
||||
<Heading size="h4" className="mx_UserOnboardingTask_title">
|
||||
{ task.title }
|
||||
{ title }
|
||||
</Heading>
|
||||
<div className="mx_UserOnboardingTask_description">
|
||||
{ task.description }
|
||||
{ description }
|
||||
</div>
|
||||
</div>
|
||||
{ task.action && (!task.action.hideOnComplete || !completed) && (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue