fix: Use soft nav when clicking a library from studio home (#1306)

This commit is contained in:
Braden MacDonald
2024-09-24 09:32:56 -07:00
committed by GitHub
parent 353ef508df
commit 64d718d198
19 changed files with 282 additions and 351 deletions

View File

@@ -1,22 +0,0 @@
import React from 'react';
import { Alert } from '@openedx/paragon';
import PropTypes from 'prop-types';
const AlertMessage = ({ title, description, ...props }) => (
<Alert {...props}>
<Alert.Heading>{title}</Alert.Heading>
<span>{description}</span>
</Alert>
);
AlertMessage.propTypes = {
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
};
AlertMessage.defaultProps = {
title: undefined,
description: undefined,
};
export default AlertMessage;

View File

@@ -0,0 +1,16 @@
import React from 'react';
import { Alert } from '@openedx/paragon';
interface Props extends React.ComponentPropsWithoutRef<typeof Alert> {
title?: string | React.ReactNode;
description?: string | React.ReactNode;
}
const AlertMessage: React.FC<Props> = ({ title, description, ...props }) => (
<Alert {...props}>
<Alert.Heading>{title}</Alert.Heading>
<span>{description}</span>
</Alert>
);
export default AlertMessage;