fix: event card styles are overridable (#240)

* fix: event card styles are overridable
This commit is contained in:
Carlos Valente
2022-11-08 20:04:07 +01:00
committed by GitHub
parent 159ba82e00
commit b9bc4627df
4 changed files with 29 additions and 41 deletions
@@ -1,23 +0,0 @@
import PropTypes from 'prop-types';
import style from './TitleCard.module.scss';
export default function TitleCard(props) {
const { label, title, subtitle, presenter } = props;
return (
<>
<div className={style.label}>{label}</div>
<div className={style.title}>{title}</div>
<div className={style.presenter}>{presenter}</div>
<div className={style.subtitle}>{subtitle}</div>
</>
);
}
TitleCard.propTypes = {
label: PropTypes.string,
title: PropTypes.string,
subtitle: PropTypes.string,
presenter: PropTypes.string,
}
@@ -1,24 +1,27 @@
@use '../../../theme/main' as *;
@use '../../../theme/main';
@use '../../../theme/viewerDefs' as *;
.label {
@include card-label;
font-size: 1.3vw;
color: var(--accent-color-override, $accent-color);
}
.title,
.subtitle,
.presenter {
@include ellipsis;
@include main.ellipsis;
}
.title {
@include card-title;
color: $title-color;
font-weight: 600;
font-size: 2.5vw;
flex: 1;
}
.subtitle,
.presenter {
color: $subtitle-gray;
color: $subtitle-color;
}
.subtitle {
@@ -0,0 +1,21 @@
import './TitleCard.scss';
interface TitleCardProps {
label: string;
title: string;
subtitle: string;
presenter: string;
}
export default function TitleCard(props: TitleCardProps) {
const { label, title, subtitle, presenter } = props;
return (
<>
<div className='label'>{label}</div>
<div className='title'>{title}</div>
<div className='presenter'>{presenter}</div>
<div className='subtitle'>{subtitle}</div>
</>
);
}
-13
View File
@@ -59,8 +59,6 @@ $error-red: #e53e3e;
//////////////////////////////////// viewers
$title-white: #fffd;
$title-gray: #ddd;
$subtitle-gray: #aaa;
//////////////////////////////////// block elements
$block-delay-color: #ecc94b;
@@ -70,17 +68,6 @@ $block-block-color: #805ad5;
$block-icon-drag: $bg-gray-100;
$block-border: 1px solid $bg-gray-800;
//////////////////////////////////// viewer cards
@mixin card-title {
color: $title-gray;
font-weight: 600;
}
@mixin card-label {
font-size: 1.3vw;
color: $ontime-pink;
}
//////////////////////////////////// utils
@mixin ellipsis {