mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-12 09:21:11 +00:00
8d8e2d85e6
* Add mediawiki ui button styles to Vector and convert language button to a quiet button * Restore the arrow for language button with ULS * Vertically align button to first line of header * Add a storybook entry for LanguageButton Additional changes: * Fix issues revealed by storybook - menu dropdown should reset generic typography rule for `ul` tags * Allow quotes usage in storybook without disable rule Bug: T268241 Change-Id: I483350084fb46a51c50af6aab78c62db6d02df89
23 lines
651 B
JavaScript
23 lines
651 B
JavaScript
/**
|
|
* @param {string} msg
|
|
* @param {number} [height=200]
|
|
* @return {string}
|
|
*/
|
|
const placeholder = ( msg, height ) => {
|
|
return `<div style="width: 100%; height: ${height || 200}px; margin-bottom: 2px;
|
|
font-size: 12px; padding: 8px; box-sizing: border-box;
|
|
display: flex; background: #eee; align-items: center;justify-content: center;">${msg}</div>`;
|
|
};
|
|
|
|
/**
|
|
* @param {string} html
|
|
* @return {string}
|
|
*/
|
|
const portletAfter = ( html ) => {
|
|
return `<div class="after-portlet after-portlet-tb">${html}</div>`;
|
|
};
|
|
|
|
const htmlUserLanguageAttributes = `dir="ltr" lang="en-GB"`;
|
|
|
|
export { placeholder, htmlUserLanguageAttributes, portletAfter };
|