Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LTS notification - v10 storybook #14860

Merged
merged 10 commits into from
Oct 19, 2023
30 changes: 30 additions & 0 deletions packages/react/.storybook/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import './styles.scss';
import './polyfills';
import PackageInfo from './../package.json';

import React, { useEffect } from 'react';

Expand All @@ -25,8 +26,37 @@ function Container({ story, id }) {
};
}, []);

// Does not include LTS message in UIShell elements to avoid overlaying
const url = window.location.href.includes('ui-shell');

return (
<React.StrictMode>
{!url && (
<div
style={{
backgroundColor: 'black',
fontSize: '1rem',
width: 'auto',
padding: '1rem',
margin: '-1rem -1rem 0px -1rem',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
gap: '2rem',
}}>
<p style={{ color: 'white' }}>
[email protected] is in maintenance mode, support is
scheduled to end on September 30, 2024.
</p>
<a
style={{ textDecoration: 'none' }}
href="https://github.com/carbon-design-system/carbon/blob/main/docs/release-schedule.md"
target="_blank">
Release schedule
</a>
</div>
)}

<div
className={id.toLowerCase()}
data-floating-menu-container
Expand Down
Loading