({
children,
theme: themeOverrides,
style,
...rest
}: Props)
| 47 | * ``` |
| 48 | */ |
| 49 | const DialogTitle = ({ |
| 50 | children, |
| 51 | theme: themeOverrides, |
| 52 | style, |
| 53 | ...rest |
| 54 | }: Props) => { |
| 55 | const theme = useInternalTheme(themeOverrides); |
| 56 | const { isV3, colors, fonts } = theme; |
| 57 | |
| 58 | const TextComponent = isV3 ? Text : Title; |
| 59 | |
| 60 | const headerTextStyle = { |
| 61 | color: isV3 ? colors.onSurface : colors?.text, |
| 62 | ...(isV3 ? fonts.headlineSmall : {}), |
| 63 | }; |
| 64 | |
| 65 | return ( |
| 66 | <TextComponent |
| 67 | variant="headlineSmall" |
| 68 | accessibilityRole="header" |
| 69 | style={[styles.text, isV3 && styles.v3Text, headerTextStyle, style]} |
| 70 | {...rest} |
| 71 | > |
| 72 | {children} |
| 73 | </TextComponent> |
| 74 | ); |
| 75 | }; |
| 76 | |
| 77 | DialogTitle.displayName = 'Dialog.Title'; |
| 78 |
nothing calls this directly
no test coverage detected
searching dependent graphs…