-
Notifications
You must be signed in to change notification settings - Fork 512
chore: example components that have been modified with typography-to-mui codemod script #68300
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
Conversation
…mui codemod script
@@ -394,7 +388,7 @@ export const WorkshopEnrollments: FC = () => { | |||
title={`Remove Enrollment${s}?`} | |||
customContent={ | |||
<Box id="dsco-dialog-description"> | |||
<Typography semanticTag="div" visualAppearance="body-two"> | |||
<Typography component="div" variant="body2" gutterBottom> |
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.
example of a wrapper Typography component
> | ||
<StrongText>{title}</StrongText> | ||
</Heading2> | ||
{/* TODO_visualAppearance_dynamic: "size === 's' ? 'body-two' : 'body-one'" */} |
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.
example of the script adding a TODO comment when the visualAppearance
prop is an expression rather than a string. the dev running the script should see this in the diff and fix before merging
@@ -23,26 +19,34 @@ const OrganizerInformation: React.FC<OrganizerInformationProps> = ({ | |||
}) => { | |||
return ( | |||
<div className={moduleStyles.card}> | |||
<Heading3 visualAppearance="heading-xs">Organizer information</Heading3> | |||
<Typography component="h3" variant="h6" gutterBottom> |
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.
example of gutterBottom
prop being added when noMargin
is not on the original component
@@ -283,9 +278,9 @@ export const WorkshopEnrollments: FC = () => { | |||
orientation="vertical" | |||
className={styles.actionDivider} | |||
/> | |||
<OverlineTwoText noMargin className={styles.numSelectedText}> | |||
<Typography className={styles.numSelectedText} variant="overline2"> |
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.
example of noMargin
prop being removed, since no margin is the default in mui Typography
closing as this was just a sample of what the typography-to-mui codemod script would do |
Links
Testing story
Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Creation Checklist: