diff --git a/docs/en/UI/Angular/Card-Component.md b/docs/en/UI/Angular/Card-Component.md index 5c92d7abed..40d23a594b 100644 --- a/docs/en/UI/Angular/Card-Component.md +++ b/docs/en/UI/Angular/Card-Component.md @@ -1,8 +1,29 @@ # Card Component The ABP Card Component is a wrapper component for the Bootstrap card class. +It supports all features which Bootstrap card component provides. -## Usage +ABP Card Component has three main components, `CardHeader` Component, `CardBody` Component and `CardFooter` Component. These components have their own class and style inputs + +|Component |Selector |Input Properties | +|--------- |-----------------|------------------------------------| +|CardHeader|`abp-card-header`| `cardHeaderClass`,`cardHeaderStyle`| +|CardBody |`abp-card-body` | `cardBodyClass`,`cardBodyStyle` | +|CardFooter|`abp-card-footer`| `cardFooterClass`,`cardFooterStyle`| + +In addition to these components, Card component provides directives like `CardHeader`,`CardTitle`,`CardSubtitle`,`CardText`,`CardLink`,`CardImgTop`. + +|Directive |Selector | +|-------------|-------------------------------------------------------------| +|CardHeader |`abp-card-header`,`[abp-card-header]`,`[abpCardHeader]` | +|CardTitle |`abp-card-title`,`[abp-card-title]`,`[abpCardTitle]` | +|CardSubtitle |`abp-card-subtitle`,`[abp-card-subtitle]`,`[abpCardSubtitle]`| +|CardText |`abp-card-text`,`[abp-card-text]`,`[abpCardText]` | +|CardLink |`abp-card-link`,`[abp-card-text]`,`[abpCardText]` | +|CardImgTop |`abp-card-img-top`,`[abp-card-img-top]`,`[abpCardImgTop]` | + + +# Usage ABP Card Component is a part of the `ThemeSharedModule` module. If you've imported that module into your module, you don't need to import it again. If not, first import it as shown below: @@ -24,29 +45,164 @@ export class MyFeatureModule {} ``` -Then, the `abp-card` component can be used. See the example below: -```ts +Then, the `abp-card` component can be used. See the examples below: +## CardBody + +```ts // card-demo.component.ts import { Component } from '@angular/core'; +@Component({ + selector: 'app-card-demo', + template: ` + + This is some text within a card body + + `, +}) +export class CardDemoComponent { } +``` +See card body result below: + +![abp-card-body](./images/abp-card-body.png) + +## Titles, Text and Links + +```ts + +//card-demo.component.ts +import { Component } from '@angular/core'; + @Component({ selector: 'app-card-demo', template: ` - Lorem Ipsum - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla commodo condimentum ligula, sed varius nibh eleifend sit amet. Maecenas facilisis vel arcu nec maximus. +
Card Title
+
Card subtitle
+

Some quick example text to build on the card title and make up the bulk of the card's content.

+ Card link + Another link
`, }) export class CardDemoComponent { } ``` +See card title, text and link result below: + +![abp-card-title-text-link](./images/abp-card-title-text-link.png) + +## Images + +```ts + +//card-demo.component.ts +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-card-demo', + template: ` + + ... + +

Some quick example text to build on the card title and make up the bulk of the card's content.

+
+
+ `, +}) +export class CardDemoComponent { } +``` +See card image result below: + +![abp-card-image-top](./images/abp-card-image.png) + +## List Groups + +```ts + +//card-demo.component.ts +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-card-demo', + template: ` + + + + `, +}) +export class CardDemoComponent { } +``` +See list group result below: -See the result below: +![abp-card-list-group](./images/abp-card-list-group.png) -![abp-card-component](./images/abp-card-component.png) +## Kitchen Sink + +```ts + +//card-demo.component.ts +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-card-demo', + template: ` + + ... + +
Card title
+

Some quick example text to build on the card title and make up the bulk of the card's content.

+
+ + + Card link + Another link + +
+ `, +}) +export class CardDemoComponent { } +``` +See kitchen sink result below: + +![abp-card-kitchen-sink](./images/abp-card-kitchen-sink.png) + +## Header and Footer + +```ts + +//card-demo.component.ts +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-card-demo', + template: ` + + Featured + +
Special title treatment
+

With supporting text below as a natural lead-in to additional content.

+ Go somewhere +
+ + 2 days ago + +
+ `, +}) +export class CardDemoComponent { } +``` +See header and footer result below: -As you can see in the example above, you can customize your card component's style with the `cardStyle` input. You can also add your custom classes with the `cardClass` input. +![abp-card-header-footer](./images/abp-card-header-footer.png) diff --git a/docs/en/UI/Angular/images/abp-card-body.png b/docs/en/UI/Angular/images/abp-card-body.png new file mode 100644 index 0000000000..d5d7d07d29 Binary files /dev/null and b/docs/en/UI/Angular/images/abp-card-body.png differ diff --git a/docs/en/UI/Angular/images/abp-card-header-footer.png b/docs/en/UI/Angular/images/abp-card-header-footer.png new file mode 100644 index 0000000000..72f0d7be45 Binary files /dev/null and b/docs/en/UI/Angular/images/abp-card-header-footer.png differ diff --git a/docs/en/UI/Angular/images/abp-card-header.png b/docs/en/UI/Angular/images/abp-card-header.png new file mode 100644 index 0000000000..a13ed5b3fe Binary files /dev/null and b/docs/en/UI/Angular/images/abp-card-header.png differ diff --git a/docs/en/UI/Angular/images/abp-card-image.png b/docs/en/UI/Angular/images/abp-card-image.png new file mode 100644 index 0000000000..c4136d524b Binary files /dev/null and b/docs/en/UI/Angular/images/abp-card-image.png differ diff --git a/docs/en/UI/Angular/images/abp-card-kitchen-sink.png b/docs/en/UI/Angular/images/abp-card-kitchen-sink.png new file mode 100644 index 0000000000..908e062ff0 Binary files /dev/null and b/docs/en/UI/Angular/images/abp-card-kitchen-sink.png differ diff --git a/docs/en/UI/Angular/images/abp-card-list-group.png b/docs/en/UI/Angular/images/abp-card-list-group.png new file mode 100644 index 0000000000..aa7b746647 Binary files /dev/null and b/docs/en/UI/Angular/images/abp-card-list-group.png differ diff --git a/docs/en/UI/Angular/images/abp-card-title-text-link.png b/docs/en/UI/Angular/images/abp-card-title-text-link.png new file mode 100644 index 0000000000..af7d009929 Binary files /dev/null and b/docs/en/UI/Angular/images/abp-card-title-text-link.png differ