fix: Use soft nav when clicking a library from studio home (#1306)
This commit is contained in:
@@ -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;
|
||||
16
src/generic/alert-message/index.tsx
Normal file
16
src/generic/alert-message/index.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user