-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ui-library): change theming approach (#991)
Co-authored-by: Julius Walther <[email protected]>
- Loading branch information
1 parent
dc549f0
commit ccb4e17
Showing
60 changed files
with
3,246 additions
and
2,971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 45 additions & 41 deletions
86
packages/ui-library/src/components/button-group/index.css.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,46 @@ | ||
import { componentTokens } from "../../foundation/_tokens-generated/__component-tokens.Light.generated.mjs"; | ||
import { typeSafeNestedCss } from "../../utils/nested-typesafe-css-literals"; | ||
|
||
const { ButtonGroup } = componentTokens.cmp; | ||
|
||
export const styleCustom = typeSafeNestedCss` | ||
.blr-button-group { | ||
display: flex; | ||
&.left { | ||
justify-content: flex-start; | ||
} | ||
&.center { | ||
justify-content: center; | ||
} | ||
&.right { | ||
justify-content: flex-end; | ||
} | ||
&.xs { | ||
gap: ${ButtonGroup.Container.ItemSpacing.XS}; | ||
} | ||
&.sm { | ||
gap: ${ButtonGroup.Container.ItemSpacing.SM}; | ||
} | ||
&.md { | ||
gap: ${ButtonGroup.Container.ItemSpacing.MD}; | ||
} | ||
&.lg { | ||
gap: ${ButtonGroup.Container.ItemSpacing.LG}; | ||
} | ||
&.xl { | ||
gap: ${ButtonGroup.Container.ItemSpacing.XL}; | ||
} | ||
} | ||
import { ComponentThemeIterator } from "../../foundation/_tokens-generated/index.pseudo.generated"; | ||
import { typeSafeNestedCss } from "../../utils/css-in-ts/nested-typesafe-css-literals"; | ||
|
||
export const staticStyles = typeSafeNestedCss/* css */ ` | ||
${ComponentThemeIterator((theme, cmp, typeSafeCss) => { | ||
const { ButtonGroup } = cmp; | ||
return typeSafeCss/* css */ ` | ||
.blr-button-group.${theme} { | ||
display: flex; | ||
&.left { | ||
justify-content: flex-start; | ||
} | ||
&.center { | ||
justify-content: center; | ||
} | ||
&.right { | ||
justify-content: flex-end; | ||
} | ||
&.xs { | ||
gap: ${ButtonGroup.Container.ItemSpacing.XS}; | ||
} | ||
&.sm { | ||
gap: ${ButtonGroup.Container.ItemSpacing.SM}; | ||
} | ||
&.md { | ||
gap: ${ButtonGroup.Container.ItemSpacing.MD}; | ||
} | ||
&.lg { | ||
gap: ${ButtonGroup.Container.ItemSpacing.LG}; | ||
} | ||
&.xl { | ||
gap: ${ButtonGroup.Container.ItemSpacing.XL}; | ||
} | ||
} | ||
`; | ||
})} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.