Skip to content

Commit

Permalink
chore: Update defaultTheme with scandinavianTheme
Browse files Browse the repository at this point in the history
  • Loading branch information
hasith committed Sep 8, 2024
1 parent 0e69957 commit 9c2c5bb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
24 changes: 22 additions & 2 deletions packages/@productled/core/src/theme/defaultTheme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Theme } from './ThemeManager';

export const defaultTheme: Theme = {
const basicTheme: Theme = {
primaryColor: '#3498db',
secondaryColor: '#2ecc71',
backgroundColor: '#ffffff',
Expand All @@ -15,4 +15,24 @@ export const defaultTheme: Theme = {
successColor: '#2ecc71',
warningColor: '#f39c12',
infoColor: '#3498db'
};
};

const scandinavianTheme: Theme = {
primaryColor: '#4A5D23', // Deep olive green
secondaryColor: '#B4B8AB', // Muted stone grey
backgroundColor: '#F5F5F1', // Soft off-white
textColor: '#2F2E2D', // Warm dark grey
fontSize: '16px',
fontFamily: 'Roboto, sans-serif', // Clean, modern font
borderRadius: '4px', // Simple sharp edges for minimalist style
boxShadow: '0px 2px 4px rgba(0, 0, 0, 0.05)', // Very light shadow for minimal depth
spacing: '8px',
linkColor: '#577590', // Muted slate blue
errorColor: '#C85454', // Reserved brick red
successColor: '#739973', // Calm moss green
warningColor: '#D9A650', // Warm ochre
infoColor: '#4A5D23' // Matches primary color
};


export { scandinavianTheme as defaultTheme };
8 changes: 8 additions & 0 deletions packages/@productled/tooltip/src/StylesElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ class StylesElement {
border-style: solid;
border-color: transparent transparent var(--primaryColor) transparent;
}
.productled-tooltip-hover-link {
color: var(--secondaryColor); /* Use CSS variable or define the color directly */
}
.productled-tooltip-hover-link:hover {
color: var(--primaryColor); /* Use CSS variable or define the hover color directly */
}
`;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@productled/tooltip/src/Tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class Tooltip {
const link = document.createElement('a');
link.href = conf.link;
link.innerText = 'Learn more';
link.style.color = this.theme.secondaryColor;
link.className = 'productled-tooltip-hover-link';
link.target = '_blank';
this.tooltip.appendChild(link);

Expand Down

0 comments on commit 9c2c5bb

Please sign in to comment.