mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-602] Accordion component - Add basic documentation (#1913)
* Add basic documentation Accordion component * Update README.md
This commit is contained in:
committed by
Eugenio Romano
parent
1ffc3cd080
commit
265d484788
@@ -297,7 +297,7 @@ _See **Demo Shell** or **DocumentList** implementation for more details and use
|
||||
|
||||
```ts
|
||||
@Component({
|
||||
selector: 'my-component
|
||||
selector: 'my-component'
|
||||
})
|
||||
export class MyComponent implements OnInit {
|
||||
|
||||
@@ -322,6 +322,41 @@ export class MyComponent implements OnInit {
|
||||
}
|
||||
```
|
||||
|
||||
## Accordion Component
|
||||
The component provide a way to easy create an accordion menu. You can customize the header and the icon.
|
||||
|
||||
```html
|
||||
<adf-accordion>
|
||||
<adf-accordion-group [heading]="titleHeading" [isSelected]="true" [headingIcon]="'assignment'">
|
||||
<my-list></my-list>
|
||||
</adf-accordion-group>
|
||||
</adf-accordion>
|
||||
```
|
||||
|
||||
```ts
|
||||
@Component({
|
||||
selector: 'my-component'
|
||||
})
|
||||
export class MyComponent implements OnInit {
|
||||
|
||||
titleHeading: string;
|
||||
|
||||
constructor() {
|
||||
this.titleHeading = 'My Group';
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `heading` | {string} | optional | The header title. |
|
||||
| `isSelected` | {boolean} | optional | Define if the accordion group is selected or not. |
|
||||
| `headingIcon` | {string} | optional | The material design icon. |
|
||||
|
||||
|
||||
## Authentication Service
|
||||
|
||||
The authentication service is used inside the [login component](../ng2-alfresco-login) and is possible to find there an example of how to use it.
|
||||
@@ -511,4 +546,4 @@ npm run coverage
|
||||
|
||||
## License
|
||||
|
||||
[Apache Version 2.0](https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE)
|
||||
[Apache Version 2.0](https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE)
|
||||
|
Reference in New Issue
Block a user