Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tall-rules-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/ds-core': patch
---

**heading**: get font size before render
10 changes: 10 additions & 0 deletions packages/core/src/components/bal-heading/bal-heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class Heading implements ComponentInterface {

@Watch('level')
levelWatcher() {
console.log('level')
this.updateAutoFontSize()
}

Expand All @@ -47,6 +48,7 @@ export class Heading implements ComponentInterface {

@Watch('visualLevel')
visualLevelWatcher() {
console.log('visualLevelWatcher')
this.updateAutoFontSize()
}

Expand Down Expand Up @@ -98,6 +100,12 @@ export class Heading implements ComponentInterface {
*/

connectedCallback(): void {
console.log('connectedCallback')
this.updateAutoFontSize()
}

componentWillRender(): Promise<void> | void {
console.log('componentWillRender')
this.updateAutoFontSize()
}

Expand Down Expand Up @@ -160,6 +168,8 @@ export class Heading implements ComponentInterface {
const Heading = this.tag
const fontColor = this.fontColor

console.log('render')

return (
<Host
class={{
Expand Down
2 changes: 2 additions & 0 deletions packages/core/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export const config: Config = {
],
extras: {
initializeNextTick: true,
experimentalScopedSlotChanges: true,
experimentalSlotFixes: true,
},
outputTargets: [
{
Expand Down
Loading