/*! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ import { Stack } from 'aws-northstar'; import { Theme, makeStyles } from '@material-ui/core/styles'; import Box from 'aws-northstar/layouts/Box'; import Heading from 'aws-northstar/components/Heading'; import React, { FunctionComponent, ReactNode } from 'react'; import Typography from '@material-ui/core/Typography'; import clsx from 'clsx'; export interface HeadingStripeProps { /** The title to display */ title: React.ReactChild | React.ReactFragment; /** The subtitle to display */ subtitle?: React.ReactChild | React.ReactFragment; /** Components to render in the right portion of the header */ actionButtons?: ReactNode; } /** A heading that spans the full width of its container */ export const HeadingStripe: FunctionComponent = ({ title, subtitle, actionButtons }) => { const classes = useStyles(); return ( {title} {subtitle && ( {subtitle} )} {actionButtons && {actionButtons}} ); }; export default HeadingStripe; const useStyles = makeStyles(() => ({ containerSubtitle: { marginTop: '5px', }, noLineHeight: { lineHeight: 'initial', }, }));