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 | import { StartScreen } from '@uniquegood/realworld-web-interface/lib/models/game/Screen/Start'; import React from 'react'; import { css } from '@emotion/react'; interface StartScreenPageSubTitleProps { subTitle: StartScreen['subTitle']; } export default function StartScreenPageSubTitle({ subTitle }: StartScreenPageSubTitleProps) { const subTitleWrapStyle = React.useMemo(() => { const cssText = ` color: ${subTitle.style.color}; font-size: ${subTitle.style.fontSize}px; font-family: ${subTitle.style.fontFamily}; `; return css(cssText); }, [subTitle.style]); return <div css={[subTitleWrap, subTitleWrapStyle]}>{subTitle.text}</div>; } const subTitleWrap = css` font-weight: 400; white-space: pre; text-align: center; `; |