0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 05:02:57 +01:00

Combine o-pill and c-status styles, as they are always used together

This commit is contained in:
Thibaud Colas 2023-12-12 17:30:10 +00:00
parent 22fd74a451
commit 484428b2d9
5 changed files with 9 additions and 13 deletions

View File

@ -1,7 +0,0 @@
.o-pill {
display: inline-block;
padding: 0.2em 0.5em;
border-radius: 0.25em;
vertical-align: middle;
line-height: 1.5;
}

View File

@ -45,9 +45,7 @@ const PageExplorerItem: React.FunctionComponent<PageExplorerItemProps> = ({
{(!isPublished || localeName) && (
<span className="c-page-explorer__meta">
{localeName && (
<span className="o-pill c-status">{localeName}</span>
)}
{localeName && <span className="c-status">{localeName}</span>}
{!isPublished && <PublicationStatus status={meta.status} />}
</span>
)}

View File

@ -1,5 +1,10 @@
.c-status {
@apply w-bg-black-50 w-tracking-tight w-text-text-label-menus-default;
display: inline-block;
padding: 0.2em 0.5em;
border-radius: 0.25em;
vertical-align: middle;
line-height: 1.5;
// stylelint-disable-next-line property-disallowed-list
text-transform: uppercase;
font-size: 0.625rem;

View File

@ -5,7 +5,7 @@ import React from 'react';
* Displays the publication status of a page in a pill.
*/
const PublicationStatus = ({ status }) => (
<span className={`o-pill c-status${status.live ? ' c-status--live' : ''}`}>
<span className={`c-status${status.live ? ' c-status--live' : ''}`}>
{status.status}
</span>
);

View File

@ -2,7 +2,7 @@
exports[`PublicationStatus #status live 1`] = `
<span
className="o-pill c-status c-status--live"
className="c-status c-status--live"
>
live + draft
</span>
@ -10,7 +10,7 @@ exports[`PublicationStatus #status live 1`] = `
exports[`PublicationStatus #status not live 1`] = `
<span
className="o-pill c-status"
className="c-status"
>
live + draft
</span>