Skip to content

Commit

Permalink
Merge pull request #1887 from smeup/icon-layer-demo
Browse files Browse the repository at this point in the history
Icon layer demo
  • Loading branch information
Leonardo-Signorelli authored May 9, 2024
2 parents f602256 + 4f4cb1a commit 9aa9f48
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/ketchup/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2929,6 +2929,11 @@ export namespace Components {
* This method is used to trigger a new render of the component.
*/
"refresh": () => Promise<void>;
/**
* Credentials sending along with request
* @default true
*/
"sendCredentials": boolean;
/**
* Sets the props to the component.
* @param props - Object containing props that will be set to the component.
Expand Down Expand Up @@ -7736,6 +7741,11 @@ declare namespace LocalJSX {
* @default null
*/
"pdfPath"?: string;
/**
* Credentials sending along with request
* @default true
*/
"sendCredentials"?: boolean;
}
interface KupPhotoFrame {
/**
Expand Down
4 changes: 3 additions & 1 deletion packages/ketchup/src/f-components/f-image/f-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ function createIcon(props: FImageProps): HTMLDivElement {
'f-image__icon': true,
};
const style: GenericObject = {
background: props.color ? props.color : `var(--kup-gray-color-70)`,
background: props.color
? props.color
: `var(--kup-icon-layer, var(--kup-gray-color-70))`,
};
if (props.resource.indexOf('--kup') > -1) {
let themeIcon: string = props.resource.replace('--', '');
Expand Down
24 changes: 24 additions & 0 deletions packages/ketchup/src/managers/kup-theme/kup-theme-application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,30 @@
--kup-layer-3: var(--kup-gray-color-30);
}

/*-------------------------------------------------*/
/* Custom CSS */
/*-------------------------------------------------*/

// Livello di profondità 0
:root {
--kup-layer-0: var(--kup-gray-color-0);
--kup-layer-1: var(--kup-gray-color-10);
--kup-layer-2: var(--kup-gray-color-20);
--kup-layer-3: var(--kup-gray-color-30);
--kup-icon-layer: var(--kup-gray-color-70);
// Livello di profondità 1
--kup-imagelist-item-background-color : var(--kup-gray-color-10);
}

// Livello di profondità 2
:root[kup-theme='ocean'] {
--kup-icon-layer: var(--kup-primary-color-70);
}

:root[kup-theme='ketchup'] {
--kup-icon-layer: red;
}

/*-------------------------------------------------*/
/* E d i t o r */
/*-------------------------------------------------*/
Expand Down

0 comments on commit 9aa9f48

Please sign in to comment.