PLT-3466 E10: Add announcement bar feature (#6509)
* E10 - Add announcement bar feature * Updates per feedback * Add component tests and snapshots * Update snapshots * Updating color picker UI (#6543) * Add class to body tag when banner is not dismissable and clean up localstorage items when banner changes * Fixing links (#6544) * Updating UI for fixed error bar (#6552) * Truncating text on fixed banner (#6561) * Plt 3466 - Error bar link states (#6577) * Updating error bar hover state * Updating error bar link states
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0f3bd85b8d
Коммит
abd0466a42
@@ -1348,3 +1348,16 @@ export function isEmptyObject(object) {
|
||||
export function updateWindowDimensions(component) {
|
||||
component.setState({width: window.innerWidth, height: window.innerHeight});
|
||||
}
|
||||
|
||||
export function removePrefixFromLocalStorage(prefix) {
|
||||
const keys = [];
|
||||
for (let i = 0; i < localStorage.length; i++) {
|
||||
if (localStorage.key(i).startsWith(prefix)) {
|
||||
keys.push(localStorage.key(i));
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
localStorage.removeItem(keys[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user