triniwiz / nativescript-accordion

Apache License 2.0
38 stars 14 forks source link

How to remove padding between items? #52

Closed meysam-mahmoodi closed 6 years ago

meysam-mahmoodi commented 6 years ago

Hello

this is my code:

            <Accordion class="accordion" [items]="items" itemTapped="tapped" headerTextBold="true" headerTextColor="white" headerColor="pink"
                headerTextColor="blue" allowMultiple="false" selectedIndex="2">

                <ng-template accordionHeaderTemplate let-item="item" let-i="index">
                    <GridLayout class="header" columns="auto,*">
                        <Label [text]="item.title" textWrap="true"></Label>
                    </GridLayout>
                </ng-template>

                <ng-template accordionItemTemplate let-item="item" let-parent="parentIndex" let-even="even" let-child="childIndex">
                    <StackLayout class="body">
                        <Label [text]="item.text" textWrap="true"></Label>
                    </StackLayout>
                </ng-template>

            </Accordion>

this is my css:

.accordion{
  border-width: 1px;
  border-color: #f3f3f3;
}

.header{
  box-shadow: 4;
  background-color: #fff;
  padding: 10 15;
}
.body{
  padding: 10 15;
  background-color: #fff;
}

and this is output of that: image

how can i remove gray padding or change height of that? thanks

triniwiz commented 6 years ago

Which version are you using ? I'm guessing it's an older version because of the markup

meysam-mahmoodi commented 6 years ago

this is at my package.json: "nativescript-accordion": "^5.0.4",

triniwiz commented 6 years ago

Try installing the new beta version 

Sent from Yahoo Mail for iPhone

On Sunday, November 11, 2018, 1:43 AM, Meysam Mahmoudi notifications@github.com wrote:

this is at my package.json: "nativescript-accordion": "^5.0.4",

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.

meysam-mahmoodi commented 6 years ago

I updated my plugin to 6.0.0-beta.1 version and padding was removed but when I tap on every title, it doesn't work (doesn't open to show content) and after tapping that, app will be closed automatically image

triniwiz commented 6 years ago

Did you update your code to follow the new template requirements?

meysam-mahmoodi commented 6 years ago

after updating new template, the problem was solved. thank you