MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / AlertBannerContent

Function AlertBannerContent

console/src/components/Alert.tsx:203–230  ·  view source on GitHub ↗
({
  children,
  title,
  variant,
}: {
  title: React.ReactNode;
  children: React.ReactNode;
  variant: AlertVariant;
})

Source from the content-addressed store, hash-verified

201);
202
203export const AlertBannerContent = ({
204 children,
205 title,
206 variant,
207}: {
208 title: React.ReactNode;
209 children: React.ReactNode;
210 variant: AlertVariant;
211}) => {
212 const { colors } = useTheme<MaterializeTheme>();
213
214 const colorScheme = getColorScheme(colors);
215 return (
216 <>
217 <Text
218 textStyle="text-ui-med"
219 borderRight="1px solid"
220 borderColor={colorScheme[variant].border}
221 paddingRight="6"
222 >
223 {title}
224 </Text>
225 <HStack paddingLeft="6" alignItems="start" flexGrow="1">
226 {children}
227 </HStack>
228 </>
229 );
230};
231
232export default Alert;

Callers

nothing calls this directly

Calls 1

getColorSchemeFunction · 0.85

Tested by

no test coverage detected