INNER CODE UNIT · TypeScript

getThemeStyles

PiyushSuthar/github-readme-quotes · src/renderer/theme/awesome-card.ts:48

export const getThemeStyles = (color : Theme | null, border: boolean) : string => {
  // If there is a matching theme, use its styles
  if (color) {
    return `
      .container {
        background-color: #${color.background};
        border: ${border ? "3px solid #"+color.symbol : "1px solid rgba(0, 0, 0, 0.2)"};
      }
      .container h3 {
        color: #${color.quote};
      }
      .container h3::before, .container h3::after {
        color: #${color.symbol};
      }
      .container p {
        color: #${color.author};
      }
    `;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…