@brightlayer-ui/react-auth-workflow
Version:
Re-usable workflow components for Authentication and Registration within Eaton applications.
22 lines (21 loc) • 794 B
JavaScript
import React from 'react';
import CardHeader from '@mui/material/CardHeader';
import Typography from '@mui/material/Typography';
/**
* Component that renders the header content for the workflow card.
*
* @param {WorkflowCardHeaderProps} props - props of WorkflowCardHeader component
*
* @category Component
*/
export const WorkflowCardHeader = (props) => {
const { title, sx, ...otherCardHeaderProps } = props;
return (React.createElement(CardHeader, { title: typeof title === 'string' ? React.createElement(Typography, { variant: 'h6' }, title) : title, sx: [
{
pt: { md: 4, sm: 2 },
px: { md: 3, sm: 2 },
pb: 0,
},
...(Array.isArray(sx) ? sx : [sx]),
], ...otherCardHeaderProps }));
};