Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1870471: Fix Tech and Dev preview badge styles #6250

Merged
merged 1 commit into from
Aug 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
}
}

.tech-preview {
.ocs-preview-badge {
&.pf-c-label {
background-color: #d93f00;
border-radius: var(--pf-global--BorderRadius--sm);
}
.pf-c-label__content {
color: var(--pf-global--Color--light-100);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import * as React from 'react';
import { Label } from '@patternfly/react-core';
import './Badge.scss';
Copy link
Contributor

Choose a reason for hiding this comment

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

Odd - how did this work before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would directly use the tech-preview class, not sure if it would work without the import.


const DevPreviewBadge: React.FC = () => (
<Label style={{ backgroundColor: '#D93F00' }}>Dev Preview</Label>
);
const DevPreviewBadge: React.FC = () => <Label className="ocs-preview-badge">Dev Preview</Label>;

export default DevPreviewBadge;
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import * as React from 'react';
import { Label } from '@patternfly/react-core';
import './Badge.scss';

const TechPreviewBadge: React.FC = () => (
<Label
className="tech-preview"
style={{
backgroundColor: '#D93F00',
height: '100%',
borderRadius: 'var(--pf-global--BorderRadius--sm)',
}}
>
Tech Preview
</Label>
);
const TechPreviewBadge: React.FC = () => <Label className="ocs-preview-badge">Tech Preview</Label>;

export default TechPreviewBadge;