-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(callouttitle): replaces string literal for callout with a co…
…nstant
- Loading branch information
1 parent
12480ea
commit c18e9c9
Showing
3 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
packages/components/src/core/Callout/components/CalloutTitle/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { AlertTitleProps } from "@mui/material/AlertTitle"; | ||
import { CALLOUT_TITLE_DISPLAY_NAME } from "../../constants"; | ||
import { StyledCalloutTitle } from "./style"; | ||
|
||
const CalloutTitle = ({ children }: AlertTitleProps): JSX.Element => { | ||
return <StyledCalloutTitle>{children}</StyledCalloutTitle>; | ||
}; | ||
|
||
// Display name required to ensure Callout expand works correctly. | ||
CalloutTitle.displayName = "CalloutTitle"; | ||
CalloutTitle.displayName = CALLOUT_TITLE_DISPLAY_NAME; | ||
|
||
export default CalloutTitle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const CALLOUT_TITLE_DISPLAY_NAME = "CalloutTitle"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters