Skip to content

Commit

Permalink
move config file out of src (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianHoffmannS2 authored and RubirajAccenture committed Jan 10, 2024
1 parent 0c518f2 commit 6851c19
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { componentTokens } from "../../../../foundation/_tokens-generated/__comp
import { semanticTokens } from "../../../../foundation/_tokens-generated/__semantic-tokens.Light.generated.mjs";

const { IconButton } = componentTokens.Actions;
const { Global } = semanticTokens;
const { Global, Action } = semanticTokens;

export const styleCustom = typeSafeNestedCss`
.focus-layer {
Expand Down Expand Up @@ -70,6 +70,30 @@ export const styleCustom = typeSafeNestedCss`
}
.loading {
&.blr-icon-button:hover, &.blr-icon-button:focus{
cursor: auto;
text-decoration: none;
&.cta{
background-color: ${Action.CTA.SurfaceFill.Loading}
}
&.primary{
background-color: ${Action.Primary.SurfaceFill.Loading}
}
&.secondary{
background-color: ${Action.Secondary.SurfaceFill.Loading}
}
&.silent{
background-color: ${Action.Silent.SurfaceFill.Loading}
}
&.destructive{
background-color: ${Action.Destructive.SurfaceFill.Loading}
}
&.Encourage{
background-color: ${Action.Encourage.SurfaceFill.Loading}
}
}
& > .icon {
visibility: hidden;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class BlrIconButton extends LitElement {
}
}}
>
${this.focused ? html`<span class="focus-layer"></span>` : nothing}
${this.focused && !this.loading ? html`<span class="focus-layer"></span>` : nothing}
${this.loading
? BlrLoaderRenderFunction({
size: loaderSizeVariant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { componentTokens } from "../../../../foundation/_tokens-generated/__comp
import { semanticTokens } from "../../../../foundation/_tokens-generated/__semantic-tokens.Light.generated.mjs";

const { TextButton } = componentTokens.Actions;
const { Global } = semanticTokens;
const { Global, Action } = semanticTokens;

export const styleCustom = typeSafeNestedCss`
.focus-layer {
Expand Down Expand Up @@ -75,6 +75,30 @@ export const styleCustom = typeSafeNestedCss`
& > .flex-container {
visibility: hidden;
}
&.blr-text-button:hover, &.blr-text-button:focus {
cursor: auto;
&.cta{
background-color: ${Action.CTA.SurfaceFill.Loading}
}
&.primary{
background-color: ${Action.Primary.SurfaceFill.Loading}
}
&.secondary{
background-color: ${Action.Secondary.SurfaceFill.Loading}
}
&.silent{
background-color: ${Action.Silent.SurfaceFill.Loading}
}
&.destructive{
background-color: ${Action.Destructive.SurfaceFill.Loading}
}
&.Encourage{
background-color: ${Action.Encourage.SurfaceFill.Loading}
}
}
}
.block {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class BlrTextButton extends LitElement {
this.size.toUpperCase(),
'Loader',
]).toLowerCase() as FormSizesType;

console.log(loaderSizeVariant);
const iconSizeVariant = getComponentConfigToken([
'SizeVariant',
'Action',
Expand Down Expand Up @@ -160,7 +160,7 @@ export class BlrTextButton extends LitElement {
}}
id=${this.buttonId || nothing}
>
${this.focused ? html`<span class="focus-layer"></span>` : nothing}
${this.focused && !this.loading ? html`<span class="focus-layer"></span>` : nothing}
${this.loading
? html`
${BlrLoaderRenderFunction({
Expand Down

0 comments on commit 6851c19

Please sign in to comment.