Skip to content
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

Move CSS for ResetIdentityPanel into EncryptionCard #29311

Merged
merged 9 commits into from
Feb 20, 2025

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Feb 18, 2025

This allows it to be re-used in other components. This feels like a slightly silly component but it's the only option I can think of that isn't just duplicating the CSS.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

This allows it to be re-used in other components. It's a *bit* magic
that EncryptionCard applies style to divs within it, although it
somewhat makes sense that it wants them styled a particular way.
The alternative would be to add another component for a div child of
encryption card like EncryptionCardButtons that just makes it flexbox
and centered: I'm not sure which is better.
@dbkr dbkr added the T-Task Tasks for the team like planning label Feb 18, 2025
Because we only want it in the destructive cards, not the other ones.
* (mostly as somewhere for the common CSS to live).
*/
export function EncryptionCardEmphasisedContent({ children }: PropsWithChildren): JSX.Element {
return <div className="mx_EncryptionCard_emphasisedContent">{children}</div>;
Copy link
Member

Choose a reason for hiding this comment

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

You can use our Flex component instead (discovered recently)

As center affected the list items too. Also add it to the flex
component because it didn't have it as an option.
@dbkr dbkr added this pull request to the merge queue Feb 20, 2025
Merged via the queue into develop with commit e8954f0 Feb 20, 2025
31 checks passed
@dbkr dbkr deleted the dbkr/remove_resetidentitypanel_css branch February 20, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants