Skip to content

Commit

Permalink
Rename singleLine to singleRow
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyomair committed Feb 13, 2024
1 parent 29f5839 commit 70b67c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/admin/admin/src/alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface AlertProps {
action?: React.ReactNode;
}

export type AlertClassKey = "root" | "message" | "title" | "text" | "action" | "closeIcon" | "hasTitle" | "singleLine";
export type AlertClassKey = "root" | "message" | "title" | "text" | "action" | "closeIcon" | "hasTitle" | "singleRow";

const styles = (theme: Theme) =>
createStyles<AlertClassKey, AlertProps>({
Expand Down Expand Up @@ -54,7 +54,7 @@ const styles = (theme: Theme) =>
alignItems: "flex-start",
},
},
singleLine: {
singleRow: {
display: "flex",
alignItems: "center",
padding: theme.spacing(2, "12px", 2, 4),
Expand All @@ -63,12 +63,12 @@ const styles = (theme: Theme) =>

const Alert = React.forwardRef<HTMLDivElement, AlertProps & WithStyles<typeof styles>>(
({ severity = "info", title, children, classes, onClose, action }, ref) => {
const singleLine = !title && (action || onClose);
const singleRow = !title && (action || onClose);
return (
<MuiAlert
ref={ref}
classes={{
root: clsx(classes.root, Boolean(title) && classes.hasTitle, singleLine && classes.singleLine),
root: clsx(classes.root, Boolean(title) && classes.hasTitle, singleRow && classes.singleRow),
message: classes.message,
}}
severity={severity}
Expand Down

0 comments on commit 70b67c3

Please sign in to comment.