mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-01 20:39:18 +00:00
fix: event card styles are overridable (#240)
* fix: event card styles are overridable
This commit is contained in:
@@ -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,
|
|
||||||
}
|
|
||||||
+8
-5
@@ -1,24 +1,27 @@
|
|||||||
@use '../../../theme/main' as *;
|
@use '../../../theme/main';
|
||||||
|
@use '../../../theme/viewerDefs' as *;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@include card-label;
|
font-size: 1.3vw;
|
||||||
|
color: var(--accent-color-override, $accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.title,
|
.title,
|
||||||
.subtitle,
|
.subtitle,
|
||||||
.presenter {
|
.presenter {
|
||||||
@include ellipsis;
|
@include main.ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
@include card-title;
|
color: $title-color;
|
||||||
|
font-weight: 600;
|
||||||
font-size: 2.5vw;
|
font-size: 2.5vw;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subtitle,
|
.subtitle,
|
||||||
.presenter {
|
.presenter {
|
||||||
color: $subtitle-gray;
|
color: $subtitle-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subtitle {
|
.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>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -59,8 +59,6 @@ $error-red: #e53e3e;
|
|||||||
|
|
||||||
//////////////////////////////////// viewers
|
//////////////////////////////////// viewers
|
||||||
$title-white: #fffd;
|
$title-white: #fffd;
|
||||||
$title-gray: #ddd;
|
|
||||||
$subtitle-gray: #aaa;
|
|
||||||
|
|
||||||
//////////////////////////////////// block elements
|
//////////////////////////////////// block elements
|
||||||
$block-delay-color: #ecc94b;
|
$block-delay-color: #ecc94b;
|
||||||
@@ -70,17 +68,6 @@ $block-block-color: #805ad5;
|
|||||||
$block-icon-drag: $bg-gray-100;
|
$block-icon-drag: $bg-gray-100;
|
||||||
$block-border: 1px solid $bg-gray-800;
|
$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
|
//////////////////////////////////// utils
|
||||||
|
|
||||||
@mixin ellipsis {
|
@mixin ellipsis {
|
||||||
|
|||||||
Reference in New Issue
Block a user