This repository was archived by the owner on Aug 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +42
-25
lines changed Expand file tree Collapse file tree 7 files changed +42
-25
lines changed Original file line number Diff line number Diff line change 77### Default
88
99``` html:preview
10- <oui-back-button href="#" heading="Title">
11- </oui-back-button>
10+ <oui-back-button href="#">Title</oui-back-button>
1211```
1312
1413### Aria label
2726
2827## API
2928
30- | Attribute | Type | Binding | One-time binding | Values | Default | Description |
31- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
32- | id | string | @? | true | | | id attribute of the input |
33- | name | string | @? | true | | | name attribute of the input |
34- | aria-label | string | @? | true | | | accessibility label |
35- | heading | string | @? | true | | | text of the header |
36- | on-click | function | &? | | | | callback on component click |
37- | href | string | @? | true | | | link url |
29+ | Attribute | Type | Binding | One-time binding | Values | Default | Description
30+ | ---- | ---- | ---- | ---- | ---- | ---- | ----
31+ | ` id ` | string | @? | true | | | id attribute of the input
32+ | ` name ` | string | @? | true | | | name attribute of the input
33+ | ` aria-label ` | string | @? | true | | | accessibility label
34+ | ` heading ` | string | @? | true | | | text of the header
35+ | ` on-click ` | function | &? | | | | callback on component click
36+ | ` href ` | string | @? | true | | | url of the return link
37+ | ` state ` | string | @? | yes | | | state of the return link
38+ | ` stateParams ` | object | <? | | | | state params of the return link
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ export default {
1111 heading : "@?" ,
1212 title : "@?" , // Deprecated: Replaced by 'heading'
1313 onClick : "&?" ,
14- href : "@?"
15- }
14+ href : "@?" ,
15+ state : "@?" ,
16+ stateParams : "<?"
17+ } ,
18+ transclude : true
1619} ;
Original file line number Diff line number Diff line change @@ -37,4 +37,9 @@ export default class {
3737 }
3838 }
3939
40+ // Return value of "ui-sref"
41+ getFullSref ( ) {
42+ return `${ this . state } (${ JSON . stringify ( this . stateParams ) } )` ;
43+ }
44+
4045}
Original file line number Diff line number Diff line change 1- < button ng-if ="::!$ctrl.href "
1+ < button ng-if ="::!$ctrl.href && !$ctrl.state "
22 type ="button "
33 class ="oui-button oui-button_icon-alone "
44 ng-attr-aria-label ="{{:: $ctrl.ariaLabel }} "
99</ button >
1010< a ng-if ="::!!$ctrl.href "
1111 class ="oui-button oui-button_icon-alone "
12+ ng-click ="$ctrl.onBtnClick() "
1213 ng-href ="{{:: $ctrl.href }} ">
1314 < i class ="oui-icon oui-icon-chevron-left " aria-hidden ="true "> </ i >
1415</ a >
15- < h2 class ="oui-back-button_title oui-header_2 " ng-bind ="::$ctrl.heading "> </ h2 >
16+ < a ng-if ="::!!$ctrl.state "
17+ class ="oui-button oui-button_icon-alone "
18+ ng-click ="$ctrl.onBtnClick() "
19+ ui-sref ="{{::$ctrl.getFullSref()}} ">
20+ < i class ="oui-icon oui-icon-chevron-left " aria-hidden ="true "> </ i >
21+ </ a >
22+ < h2 class ="oui-back-button_title oui-header_2 " ng-transclude > {{::$ctrl.heading}}</ h2 >
Original file line number Diff line number Diff line change 77### Default
88
99``` html:preview
10- <oui-button text="Default button" on-click="onClick()"></oui-button>
10+ <oui-button on-click="onClick()">Default button </oui-button>
1111```
1212
1313### Action buttons
1414
1515``` html:preview
16- <div >
16+ <p >
1717 <oui-button variant="primary" text="Primary"></oui-button>
1818 <oui-button variant="secondary" text="Secondary"></oui-button>
1919 <oui-button variant="link" text="Link"></oui-button>
20- </div >
20+ </p >
2121
22- <div >
22+ <p >
2323 <oui-button variant="primary" text="Primary" disabled></oui-button>
2424 <oui-button variant="secondary" text="Secondary" disabled></oui-button>
2525 <oui-button variant="link" text="Link" disabled></oui-button>
26- </div >
26+ </p >
2727```
2828
2929### Steps buttons
3030
3131``` html:preview
32- <div >
32+ <p >
3333 <oui-button variant-nav="previous" text="Previous" on-click="previous()"></oui-button>
3434 <oui-button variant="primary" variant-nav="next" text="Next" on-click="next()"></oui-button>
35- </div >
35+ </p >
3636
37- <div >
37+ <p >
3838 <oui-button variant-nav="previous" text="Previous" on-click="previous()" disabled></oui-button>
3939 <oui-button variant="primary" variant-nav="next" text="Next" on-click="next()" disabled></oui-button>
40- </div >
40+ </p >
4141```
4242
4343### Accessibility
Original file line number Diff line number Diff line change @@ -16,5 +16,6 @@ export default {
1616 onClick : "&?"
1717 } ,
1818 controller,
19- template
19+ template,
20+ transclude : true
2021} ;
Original file line number Diff line number Diff line change 1616>
1717 < span aria-hidden ="true " class ="oui-icon oui-icon_circle oui-icon-chevron-left "
1818 ng-if ="::$ctrl.variantNav === 'previous' "> </ span >
19- < span ng-bind =" ::$ctrl.text " > </ span >
19+ < span ng-transclude > {{ ::$ctrl.text}} </ span >
2020 < span aria-hidden ="true " class ="oui-icon oui-icon_circle oui-icon-chevron-right "
2121 ng-if ="::$ctrl.variantNav === 'next' "> </ span >
2222</ button >
You can’t perform that action at this time.
0 commit comments