Skip to content

Commit 616eb4e

Browse files
authored
Merge pull request #2357 from Financial-Times/am/scoop-to-exclusive
[CULT-757] Scoop to exclusive
2 parents c23ecde + 8ff2c0d commit 616eb4e

File tree

5 files changed

+34
-38
lines changed

5 files changed

+34
-38
lines changed

components/o-labels/demos/src/data/states-content.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"content": "Premium"
1818
},
1919
{
20-
"id": "content-scoop",
20+
"id": "content-exclusive",
2121
"content": "Exclusive"
2222
}
2323
]

components/o-labels/src/scss/_brand.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $_o-labels-shared-brand-config: (
4747
background-color: oPrivateFoundationGet('o3-color-palette-slate'),
4848
border-color: oPrivateFoundationGet('o3-color-palette-slate')
4949
),
50-
'content-scoop': (
50+
'content-exclusive': (
5151
background-color: oPrivateFoundationGet('o3-color-palette-ft-pink'),
5252
border-color: oPrivateFoundationGet('o3-color-palette-ft-pink'),
5353
text-color: oPrivateFoundationGet('o3-color-palette-black-80')
@@ -68,7 +68,7 @@ $_o-labels-shared-brand-config: (
6868
'small',
6969
'content-commercial',
7070
'content-premium',
71-
'content-scoop',
71+
'content-exclusive',
7272
'lifecycle-beta'
7373
)
7474
));

components/o-labels/src/scss/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $_o-labels-standard-sizes: (
3030
$_o-labels-standard-states: (
3131
'content-commercial',
3232
'content-premium',
33-
'content-scoop',
33+
'content-exclusive',
3434

3535
'lifecycle-beta',
3636

components/o-labels/src/tsx/label.tsx

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ export interface SupportLabelProps extends BaseLabelProps {
99
| 'support-dead'
1010
| 'support-deprecated'
1111
| 'support-experimental'
12-
| 'support-maintained'
12+
| 'support-maintained';
1313
}
1414
export interface ServiceLabelProps extends BaseLabelProps {
15-
state:
16-
| 'tier-bronze'
17-
| 'tier-gold'
18-
| 'tier-platinum'
19-
| 'tier-silver'
15+
state: 'tier-bronze' | 'tier-gold' | 'tier-platinum' | 'tier-silver';
2016
}
2117
export interface ColourLabelProps extends BaseLabelProps {
2218
state:
@@ -26,24 +22,24 @@ export interface ColourLabelProps extends BaseLabelProps {
2622
| 'slate'
2723
| 'jade'
2824
| 'crimson'
29-
| 'mandarin'
25+
| 'mandarin';
3026
}
3127
export interface ContentLabelProps extends BaseLabelProps {
32-
state:
33-
| 'content-commercial'
34-
| 'content-premium'
35-
| 'content-scoop'
28+
state: 'content-commercial' | 'content-premium' | 'content-exclusive';
3629
}
3730
export interface LifeCycleLabelProps extends BaseLabelProps {
38-
state:
39-
| 'lifecycle-beta'
31+
state: 'lifecycle-beta';
4032
}
4133

4234
function SimpleLabel({
4335
size,
4436
state,
4537
children,
46-
}: {size?: string, state?: string, children: string}): React.JSX.Element {
38+
}: {
39+
size?: string;
40+
state?: string;
41+
children: string;
42+
}): React.JSX.Element {
4743
const classNames = ['o-labels'];
4844
if (size) {
4945
classNames.push(`o-labels--${size}`);
@@ -55,23 +51,23 @@ function SimpleLabel({
5551
}
5652

5753
export function BaseLabel(props: BaseLabelProps): React.JSX.Element {
58-
return SimpleLabel(props)
54+
return SimpleLabel(props);
5955
}
6056

6157
export function SupportLabel(props: SupportLabelProps): React.JSX.Element {
62-
return SimpleLabel(props)
58+
return SimpleLabel(props);
6359
}
6460
export function ServiceLabel(props: ServiceLabelProps): React.JSX.Element {
65-
return SimpleLabel(props)
61+
return SimpleLabel(props);
6662
}
6763
export function ColourLabel(props: ColourLabelProps): React.JSX.Element {
68-
return SimpleLabel(props)
64+
return SimpleLabel(props);
6965
}
7066
export function ContentLabel(props: ContentLabelProps): React.JSX.Element {
71-
return SimpleLabel(props)
67+
return SimpleLabel(props);
7268
}
7369
export function LifeCycleLabel(props: LifeCycleLabelProps): React.JSX.Element {
74-
return SimpleLabel(props)
70+
return SimpleLabel(props);
7571
}
7672

7773
export interface IndicatorLabelProps {
@@ -93,34 +89,34 @@ export function IndicatorLabel({
9389
if (inverse) {
9490
classNames.push('o-labels-indicator--inverse');
9591
}
96-
if(badge) {
92+
if (badge) {
9793
classNames.push('o-labels-indicator--badge');
9894
}
9995
return (
10096
<span className={classNames.join(' ')}>
101-
<span className="o-labels-indicator__status"> {status || indicator} </span>
97+
<span className="o-labels-indicator__status">
98+
{' '}
99+
{status || indicator}{' '}
100+
</span>
102101
{timestamp && (
103-
<span className="o-labels-indicator__timestamp">
104-
{timestamp}
105-
</span>
102+
<span className="o-labels-indicator__timestamp">{timestamp}</span>
106103
)}
107104
</span>
108105
);
109106
}
110107

111108
export interface TimestampLabelProps {
112109
inverse?: boolean;
113-
children?: React.JSX.Element | React.JSX.Element[]
110+
children?: React.JSX.Element | React.JSX.Element[];
114111
}
115112

116-
export function TimestampLabel({inverse, children}: TimestampLabelProps): React.JSX.Element {
113+
export function TimestampLabel({
114+
inverse,
115+
children,
116+
}: TimestampLabelProps): React.JSX.Element {
117117
const classNames = ['o-labels-timestamp'];
118118
if (inverse) {
119119
classNames.push('o-labels-timestamp--inverse');
120120
}
121-
return (
122-
<span className={classNames.join(' ')}>
123-
{children}
124-
</span>
125-
);
121+
return <span className={classNames.join(' ')}>{children}</span>;
126122
}

components/o-labels/stories/core/content.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const ComponentDescription = {
66
component: ContentLabelTsx,
77
argTypes: {
88
state: {
9-
options: ['content-commercial', 'content-premium', 'content-scoop'],
9+
options: ['content-commercial', 'content-premium', 'content-exclusive'],
1010
defaultValue: 'content-premium',
1111
},
1212
size: {
@@ -35,7 +35,7 @@ export const ContentLabel = args => {
3535
case 'content-commercial':
3636
copy = 'Paid Post';
3737
break;
38-
case 'content-scoop':
38+
case 'content-exclusive':
3939
copy = 'Exclusive';
4040
break;
4141
default:

0 commit comments

Comments
 (0)