1+ # fivFeature
12
2- # Feature Discovery
3+ ### Motivation
34
4- ## Import
5+ Material style [ Feature Discovery] ( https://material.io/archive/guidelines/growth-communications/feature-discovery.html ) component for Ionic.
6+
7+ ## Import the module
8+
9+ Import ` FivFeatureDiscoveryModule ` into ` app.module.ts ` , because the ` FivFeatureDiscovery ` component has to be registered as an entry component.
510
611``` typescript
12+ import { NgModule } from ' @angular/core' ;
713import { FivFeatureDiscoveryModule } from ' @fivethree/core' ;
8- ...
14+
915@NgModule ({
1016 imports: [
1117 ...
12- FivFeatureDiscoveryModule
13- ],
14- ...
18+ FivFeatureDiscoveryModule ,
19+ ...
20+ ]
1521})
16- export class HomePageModule {}
22+ export class AppModule {}
23+ ```
1724
25+ Now import ` FivFeatureDiscoveryModule ` in your page or component module:
26+
27+ ``` typescript
28+ import { NgModule } from ' @angular/core' ;
29+ import { FivFeatureDiscoveryModule } from ' @fivethree/core' ;
30+
31+ @NgModule ({
32+ imports: [
33+ ...
34+ FivFeatureDiscoveryModule ,
35+ ...
36+ ]
37+ })
38+ export class HomePageModule {}
1839```
1940
2041## Usage
2142
22- ### Basic Example
23-
2443``` html
2544<ion-button #feature =" fivFeature" [fivFeature] =" content" >
2645 Click Me
@@ -31,7 +50,6 @@ export class HomePageModule {}
3150 <fiv-icon #feature =" fivFeature" [fivFeature] =" content" name =" add" > </fiv-icon >
3251</ion-button >
3352
34-
3553...
3654<!-- the content that will be displayed in the circle -->
3755<ng-template #content >
@@ -77,5 +95,52 @@ export class HomePage {
7795
7896```
7997
98+ ## Properties
99+
100+ | ` maxDiameter ` | |
101+ | ------------- | -------------------------------------------------------- |
102+ | Description | The max diameter for the feature discovery content area |
103+ | Type | ` number ` |
104+ | Default | 1080 |
105+
106+ | ` diameter ` | |
107+ | ----------- | -------------------------------------------------------- |
108+ | Description | The max diameter for the feature discovery content area |
109+ | Type | ` number ` |
110+ | Default | Minimum value of ` maxDiameter ` and device width |
111+
112+ | ` contentOffset ` | |
113+ | --------------- | -------------------------- |
114+ | Description | The offset of the content |
115+ | Type | ` number ` |
116+ | Default | 20 |
117+
118+ | ` featurePadding ` | |
119+ | ---------------- | -------------------------- |
120+ | Description | The padding of the content |
121+ | Type | ` number ` |
122+ | Default | 20 |
123+
124+ ## Events
125+
126+ | Name | Description |
127+ | ----------------- | ----------------------------------- |
128+ | ` fivFeatureClick ` | Emitted when the feature is clicked |
129+ | ` fivOpen ` | Emitted when the feature di |
130+
131+ ## Methods
132+
133+ ` FivFeature `
134+
135+ | Name | Description |
136+ | ------ | -------------------------- |
137+ | ` show ` | Show the feature discovery |
138+ | ` hide ` | Hide the feature discovery |
80139
140+ ## CSS Variables
81141
142+ | Name | Description |
143+ | ------------------- | ------------------------------------------------ |
144+ | --fiv-color-feature | Background of the feature discovery content area |
145+ | --fiv-color-pulse | Color for the pulse color |
146+ | --fiv-color-icon | Icon color of the icon inside the pulse circle |
0 commit comments