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:
parent
22fd74a451
commit
484428b2d9
@ -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;
|
||||
}
|
@ -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>
|
||||
)}
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
);
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user