-
Hi I´m trying to to add some padding between Start and Body of an Addon so that its the same length. Just so that two AddonType.Body's will line up. Here are two approaches that I have been trying out, unsuccessfully. <Card>
<CardTitle Size="5" Margin="Margin.Is3">Title</CardTitle>
<CardBody>
<Field JustifyContent="JustifyContent.Center">
<Addons>
<Addon AddonType="AddonType.Start" Padding="Padding.Is5.FromRight">
Nr. 1
</Addon>
<Addon AddonType="AddonType.Body">
<TextEdit Padding="Padding.Is2.FromRight">
<Feedback>
<ValidationError />
</Feedback>
</TextEdit>
</Addon>
<Addon AddonType="AddonType.End">
<Tooltip Text="@L["Copy"]">
<Button Color="Color.Primary">
<Icon Name="@("fa-copy")" Style="font-size:large" />
</Button>
</Tooltip>
</Addon>
</Addons>
</Field>
<Field JustifyContent="JustifyContent.Center">
<Addons>
<Addon AddonType="AddonType.Start" Padding="Padding.Is5.FromRight">
Nr. 2 longer
</Addon>
<Addon AddonType="AddonType.Body">
<TextEdit Padding="Padding.Is2.FromRight">
<Feedback>
<ValidationError />
</Feedback>
</TextEdit>
</Addon>
<Addon AddonType="AddonType.End">
<Tooltip Text="@L["Copy"]">
<Button Color="Color.Primary">
<Icon Name="@("fa-copy")" Style="font-size:large" />
</Button>
</Tooltip>
</Addon>
</Addons>
</Field>
<Field JustifyContent="JustifyContent.Center">
<Addons>
<Addon AddonType="AddonType.Start">
Nr. 3
</Addon>
// here I was just seeing if adding padding to the right/left would do anything.. it doesn´t...
<Addon AddonType="AddonType.Body" Padding="Padding.Is2.FromRight">
<TextEdit Padding="Padding.Is2.FromRight">
<Feedback>
<ValidationError />
</Feedback>
</TextEdit>
</Addon>
<Addon AddonType="AddonType.End">
<Tooltip Text="@L["Copy"]">
<Button Color="Color.Primary">
<Icon Name="@("fa-copy")" Style="font-size:large" />
</Button>
</Tooltip>
</Addon>
</Addons>
</Field>
<Field JustifyContent="JustifyContent.Center">
<Addons>
<Addon AddonType="AddonType.Start">
Nr. 4
</Addon>
<Addon AddonType="AddonType.Body" Padding="Padding.Is2.FromLeft">
<TextEdit Padding="Padding.Is2.FromLeft">
<Feedback>
<ValidationError />
</Feedback>
</TextEdit>
</Addon>
<Addon AddonType="AddonType.End">
<Tooltip Text="@L["Copy"]">
<Button Color="Color.Primary">
<Icon Name="@("fa-copy")" Style="font-size:large" />
</Button>
</Tooltip>
</Addon>
</Addons>
</Field>
</CardBody>
</Card> 2. <Field ColumnSize="ColumnSize.Is12.OnDesktop">
<Card>
<CardTitle Size="5" Margin="Margin.Is3">Title</CardTitle>
<CardBody>
<Field Horizontal="true">
<FieldLabel ColumnSize="ColumnSize.Is1">Test</FieldLabel>
<FieldBody ColumnSize="ColumnSize.Is11">
<Addon AddonType="AddonType.Body">
<TextEdit>
<Feedback>
<ValidationError />
</Feedback>
</TextEdit>
</Addon>
<Addon AddonType="AddonType.End">
<Tooltip Text="@L["Copy"]">
<Button Color="Color.Primary">
<Icon Name="@("fa-copy")" Style="font-size:large" />
</Button>
</Tooltip>
</Addon>
</FieldBody>
</Field>
</CardBody>
</Card>
</Field> |
Beta Was this translation helpful? Give feedback.
Answered by
stsrki
May 14, 2021
Replies: 1 comment 2 replies
-
You missed the <Field ColumnSize="ColumnSize.Is12.OnDesktop">
<Card>
<CardTitle Size="5" Margin="Margin.Is3">Title</CardTitle>
<CardBody>
<Field Horizontal="true">
<FieldLabel ColumnSize="ColumnSize.Is1">Test</FieldLabel>
<FieldBody ColumnSize="ColumnSize.Is11">
+ <Addons>
<Addon AddonType="AddonType.Body">
<TextEdit>
<Feedback>
<ValidationError />
</Feedback>
</TextEdit>
</Addon>
<Addon AddonType="AddonType.End">
<Tooltip Text="@L["Copy"]">
<Button Color="Color.Primary">
<Icon Name="@("fa-copy")" Style="font-size:large" />
</Button>
</Tooltip>
</Addon>
</Addons>
</FieldBody>
</Field>
</CardBody>
</Card>
</Field> |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
sturlath
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You missed the
Addons
wrapper<Field ColumnSize="ColumnSize.Is12.OnDesktop"> <Card> <CardTitle Size="5" Margin="Margin.Is3">Title</CardTitle> <CardBody> <Field Horizontal="true"> <FieldLabel ColumnSize="ColumnSize.Is1">Test</FieldLabel> <FieldBody ColumnSize="ColumnSize.Is11"> + <Addons> <Addon AddonType="AddonType.Body"> <TextEdit> <Feedback> <ValidationError /> </Feedback> </TextEdit> </Addon> …