SettingsRow: add "members only" tag
Not using the membership icons because that has 2 colors for premium and premium+. Keeping it generic and simple.
This commit is contained in:
parent
d3109bd330
commit
fdd83537a3
2 changed files with 16 additions and 2 deletions
|
@ -9,11 +9,12 @@ type Props = {
|
|||
useVerticalSeparator?: boolean, // Show a separator line between Label and Value. Useful when there are multiple Values.
|
||||
disabled?: boolean,
|
||||
highlighted?: boolean,
|
||||
membersOnly?: boolean,
|
||||
children?: React$Node,
|
||||
};
|
||||
|
||||
export default function SettingsRow(props: Props) {
|
||||
const { title, subtitle, multirow, useVerticalSeparator, disabled, highlighted, children } = props;
|
||||
const { title, subtitle, multirow, useVerticalSeparator, disabled, highlighted, membersOnly, children } = props;
|
||||
return (
|
||||
<div
|
||||
className={classnames('card__main-actions settings-row', {
|
||||
|
@ -23,7 +24,10 @@ export default function SettingsRow(props: Props) {
|
|||
})}
|
||||
>
|
||||
<div className="settings-row__title">
|
||||
<p>{title}</p>
|
||||
<span>
|
||||
{title}
|
||||
{membersOnly && <span className="settings-row__members-only">{'PREMIUM'}</span>}
|
||||
</span>
|
||||
{subtitle && <p className="settings-row__subtitle">{subtitle}</p>}
|
||||
</div>
|
||||
<div
|
||||
|
|
|
@ -372,3 +372,13 @@
|
|||
border-left: 1px solid var(--color-border);
|
||||
}
|
||||
}
|
||||
|
||||
.settings-row__members-only {
|
||||
color: var(--color-secondary);
|
||||
font-size: var(--font-xxsmall);
|
||||
margin-left: var(--spacing-m);
|
||||
padding: 1px var(--spacing-xxs) 0 var(--spacing-xxs);
|
||||
border: 1px solid var(--color-secondary);
|
||||
border-radius: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue