Skip to content

Commit

Permalink
remove status icon (#52457)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaxonF committed Jul 11, 2023
1 parent 1a8daf5 commit a23eba4
Showing 1 changed file with 1 addition and 35 deletions.
Expand Up @@ -9,42 +9,10 @@ import classnames from 'classnames';
import { __, sprintf } from '@wordpress/i18n';
import { dateI18n, getDate, humanTimeDiff } from '@wordpress/date';
import { createInterpolateElement } from '@wordpress/element';
import { Path, SVG } from '@wordpress/primitives';

const publishedIcon = (
<SVG fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<Path
fillRule="evenodd"
clipRule="evenodd"
d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16Zm-1.067-5.6 4.2-5.667.8.6-4.8 6.467-3-2.267.6-.8 2.2 1.667Z"
/>
</SVG>
);

const draftIcon = (
<SVG fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<Path
fillRule="evenodd"
clipRule="evenodd"
d="M14.5 8a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0ZM16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-8 4a4 4 0 0 0 0-8v8Z"
/>
</SVG>
);

const pendingIcon = (
<SVG fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<Path
fillRule="evenodd"
clipRule="evenodd"
d="M14.5 8a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0ZM16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0ZM8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z"
/>
</SVG>
);

export default function StatusLabel( { status, date, short } ) {
const relateToNow = humanTimeDiff( date );
let statusLabel = status;
let statusIcon = pendingIcon;
switch ( status ) {
case 'publish':
statusLabel = date
Expand All @@ -57,7 +25,6 @@ export default function StatusLabel( { status, date, short } ) {
{ time: <time dateTime={ date } /> }
)
: __( 'Published' );
statusIcon = publishedIcon;
break;
case 'future':
const formattedDate = dateI18n(
Expand All @@ -77,7 +44,6 @@ export default function StatusLabel( { status, date, short } ) {
break;
case 'draft':
statusLabel = __( 'Draft' );
statusIcon = draftIcon;
break;
case 'pending':
statusLabel = __( 'Pending' );
Expand All @@ -99,7 +65,7 @@ export default function StatusLabel( { status, date, short } ) {
}
) }
>
{ statusIcon } { statusLabel }
{ statusLabel }
</div>
);
}

1 comment on commit a23eba4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in a23eba4.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5515638136
📝 Reported issues:

Please sign in to comment.