forked from jmix-framework/jmix-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document Flow UI div HTML element jmix-framework#514
- Loading branch information
Showing
7 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
...mples/onboarding/src/main/java/com/company/onboarding/view/htmlcomponent/div/DivView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.company.onboarding.view.htmlcomponent.div; | ||
|
||
|
||
import com.company.onboarding.view.main.MainView; | ||
import com.vaadin.flow.router.Route; | ||
import io.jmix.flowui.view.*; | ||
|
||
@Route(value = "DivView", layout = MainView.class) | ||
@ViewController("DivView") | ||
@ViewDescriptor("div-view.xml") | ||
public class DivView extends StandardView { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
.../onboarding/src/main/resources/com/company/onboarding/view/htmlcomponent/div/div-view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<view xmlns="http://jmix.io/schema/flowui/view" | ||
title="msg://divView.title"> | ||
<layout> | ||
<!-- tag::basics[] --> | ||
<div themeNames="success"> | ||
<p text="This paragraph has green text and a light green background."/> | ||
</div> | ||
<!-- end::basics[] --> | ||
</layout> | ||
</view> |
Binary file added
BIN
+18.3 KB
content/modules/flow-ui/images/visual-components/html-components/div-basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
= div | ||
|
||
`div` wraps related components together, so they can be easily styled. If there are no nested components and styles, it represents nothing -- the user will see an empty space. | ||
|
||
* XML element: `div` | ||
* Java class: `Div` | ||
== Basics | ||
|
||
The following example shows `div` that applies a standard theme to its nested component: | ||
|
||
[source,xml,indent=0] | ||
---- | ||
include::example$onboarding/src/main/resources/com/company/onboarding/view/htmlcomponent/div/div-view.xml[tags=basics] | ||
---- | ||
|
||
image::visual-components/html-components/div-basic.png[align="center", width="430"] | ||
|
||
|
||
[[attributes]] | ||
== Attributes | ||
|
||
xref:vc/common-attributes.adoc#id[id] - | ||
xref:vc/common-attributes.adoc#classNames[classNames] - | ||
xref:vc/common-attributes.adoc#colspan[colspan] - | ||
xref:vc/common-attributes.adoc#enabled[enabled] - | ||
xref:vc/common-attributes.adoc#height[height] - | ||
xref:vc/common-attributes.adoc#maxHeight[maxHeight] - | ||
xref:vc/common-attributes.adoc#maxWidth[maxWidth] - | ||
xref:vc/common-attributes.adoc#minHeight[minHeight] - | ||
xref:vc/common-attributes.adoc#minWidth[minWidth] - | ||
xref:vc/common-attributes.adoc#text[text] - | ||
<<themeNames,themeNames>> - | ||
xref:vc/common-attributes.adoc#title[title] - | ||
xref:vc/common-attributes.adoc#visible[visible] - | ||
<<whiteSpace, whiteSpace>> - | ||
xref:vc/common-attributes.adoc#width[width] | ||
|
||
[[themeNames]] | ||
=== themeNames | ||
|
||
Adds a theme to the component. Possible values are: | ||
|
||
* `normal` | ||
* `success` | ||
* `error` | ||
* `contrast` | ||
* `primary` | ||
* `small` | ||
* `pill` | ||
|
||
[[whiteSpace]] | ||
=== whiteSpace | ||
|
||
++++ | ||
<div class="jmix-ui-live-demo-container"> | ||
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/white-space" class="mdn-docs-btn" target="_blank">MDN</a> | ||
</div> | ||
++++ | ||
|
||
Defines the component's `white-space` style value. Possible values are: | ||
|
||
* `NORMAL` | ||
* `NOWRAP` | ||
* `PRE` | ||
* `PRE_WRAP` | ||
* `PRE_LINE` | ||
* `BREAK_SPACES` | ||
* `INHERIT` | ||
* `INITIAL` | ||
|
||
[[handlers]] | ||
== Handlers | ||
|
||
xref:vc/common-handlers.adoc#AttachEvent[AttachEvent] - | ||
<<ClickEvent, ClickEvent>> - | ||
xref:vc/common-handlers.adoc#DetachEvent[DetachEvent] | ||
|
||
include::../handler-generation-tip.adoc[] | ||
|
||
[[ClickEvent]] | ||
=== ClickEvent | ||
|
||
`com.vaadin.flow.component.ClickEvent` is sent when the user clicks on the component. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters