-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
24 changed files
with
248 additions
and
1,373 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
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
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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'extend-doc', | ||
template: ` | ||
<app-docsectiontext> | ||
<p> | ||
The theming system can be extended by adding custom design tokens and additional styles. This feature provides a high degree of customization, allowing you to adjust styles according to your needs, as you are not limited to the | ||
default tokens. | ||
</p> | ||
<p>The example preset configuration adds a new <i>accent</i> button with custom <i>button.accent.color</i> and <i>button.accent.inverse.color</i> tokens. It is also possible to add tokens globally to share them within the components.</p> | ||
</app-docsectiontext> | ||
<app-code [code]="code" selector="component-demo" [hideToggleCode]="true"></app-code> | ||
` | ||
}) | ||
export class ExtendDoc { | ||
code = { | ||
typescript: `const MyPreset = definePreset(Aura, { | ||
components: { | ||
// custom button tokens and additional style | ||
button: { | ||
extend: { | ||
accent: { | ||
color: '#f59e0b', | ||
inverseColor: '#ffffff' | ||
} | ||
} | ||
css: ({ dt }) => \` | ||
.p-button-accent { | ||
background: \${dt('button.accent.color')}; | ||
color: \${dt('button.accent.inverse.color')}; | ||
transition-duration: \${dt('my.transition.fast')}; | ||
} | ||
\` | ||
} | ||
}, | ||
// common tokens and styles | ||
extend: { | ||
my: { | ||
transition: { | ||
slow: '0.75s' | ||
normal: '0.5s' | ||
fast: '0.25s' | ||
}, | ||
imageDisplay: 'block' | ||
} | ||
}, | ||
css: ({ dt }) => \` | ||
/* Global CSS */ | ||
img { | ||
display: \${dt('my.image.display')}; | ||
} | ||
\` | ||
});` | ||
}; | ||
} |
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.