Skip to content

Commit

Permalink
docs(theme): update theme
Browse files Browse the repository at this point in the history
deprecated `lyTheme`

BREAKING CHANGE: for theming use LyThemeModule or MinimaThemeModule

To set a new theme you should import LyThemeModule

example:

LyThemeModule.setTheme('minima-dark')

examples for child theme:

Before:

```ts
@NgModule({
  ...
   LyCommonModule, // <-- theme, bg, color, raised & others
})
`

```html
<element lyTheme="minima-dark">
`

After:

import theme

```ts
@NgModule({
  ...
  LyCommonModule, // <-- bg, color, raised & others
  MinimaThemeModule // <-- themes
})
`

```html
<element ly-theme-minima-dark>
`
  • Loading branch information
alyleui committed Jul 29, 2018
1 parent 45da187 commit a4c0105
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 130 deletions.
10 changes: 8 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import { CardDemoBasicModule } from '@docs/components/card-demo/card-demo-basic/
import { LyTypographyModule } from '@alyle/ui/typography';
import { TypographyDemoComponent } from '@docs/components/typography-demo/typography-demo.component';
import { TypographyDemoBasicModule } from '@docs/components/typography-demo/typography-demo-basic/typography-demo-basic.module';
import { MultipleThemesComponent } from './components/multiple-themes/multiple-themes.component';
import { MultipleThemesDemo01Module } from './components/multiple-themes/multiple-themes-demo-01/multiple-themes-demo-01.module';

const Quepal = {
default: `linear-gradient(135deg,#11998e 0%,#38ef7d 100%)`,
Expand Down Expand Up @@ -70,6 +72,8 @@ export class MyCustomTheme extends LyThemeConfig {
declarations: [
AppComponent,
TitleComponent,
/** Customization */
MultipleThemesComponent,
/** Getting started */
InstallationComponent,
/** Components */
Expand All @@ -78,12 +82,14 @@ export class MyCustomTheme extends LyThemeConfig {
],
imports: [
BrowserModule.withServerTransition({appId: '@alyle/ui'}),
/** Customization */
/** MultipleThemes >*/MultipleThemesDemo01Module,
/** Layout */
GridDemoModule,
FlexDemoModule,
ResponsiveDemoModule,
/** CardDemo > **/CardDemoBasicModule,
/** TypographyDemo > **/TypographyDemoBasicModule,
/** CardDemo > */CardDemoBasicModule,
/** TypographyDemo > */TypographyDemoBasicModule,
CommonModule,
FormsModule,
HttpClientModule,
Expand Down
3 changes: 2 additions & 1 deletion src/app/app.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import { HomeModule } from './home/home.module';
import { InstallationComponent } from '@docs/getting-started/installation/installation.component';
import { CardDemoComponent } from '@docs/components/card-demo/card-demo.component';
import { TypographyDemoComponent } from '@docs/components/typography-demo/typography-demo.component';
import { MultipleThemesComponent } from './components/multiple-themes/multiple-themes.component';

const routes: Routes = [
/** Customization */
{ path: 'customization/theming', loadChildren: './components/theming/theming.module#ThemingModule' },
{ path: 'customization/multiple-themes', loadChildren: './components/multiple-themes/multiple-themes.module#MultipleThemesModule' },
{ path: 'customization/multiple-themes', component: MultipleThemesComponent },
{ path: 'customization/bg-color', loadChildren: './components/bg-color-demo/bg-color-demo.module#BgColorDemoModule' },
/** Components */
{
Expand Down

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions src/app/components/multiple-themes/multiple-themes.module.ts

This file was deleted.

0 comments on commit a4c0105

Please sign in to comment.