Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import { StartScreen } from '@uniquegood/realworld-web-interface/lib/models/game/Screen/Start';
import React from 'react';
import { css } from '@emotion/react';
interface StartScreenPageTitleProps {
title: StartScreen['title'];
}
export default function StartScreenPageTitle({ title }: StartScreenPageTitleProps) {
const titleWrapStyle = React.useMemo(() => {
const cssText = `
color: ${title.style.color};
font-size: ${title.style.fontSize}px;
font-family: ${title.style.fontFamily};
`;
return css(cssText);
}, [title.style]);
return <div css={[titleWrap, titleWrapStyle]}>{title.text}</div>;
}
const titleWrap = css`
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
`;
|