-
Notifications
You must be signed in to change notification settings - Fork 1
3. Components
Santino edited this page May 15, 2024
·
11 revisions
All components have a theme
and variant
attribute, see more about how to use them in the Theming page.
Add this lines of code to your app.module.ts
:
import { OsWindowModule } from "@santinobch/os-window-angular";
...
@NgModule({
imports: [
OsWindowModule
]
})
This is the normal format of a os-window component instance:
<os-window>
<window-title> Example title </window-title>
<window-content>
<!-- Fill me with anything -->
</window-content>
</os-window>
-
minHeight
&minWidth
: The window will not resize under the inputed value. Deafults to 200px. -
height
&width
: Sets the initial Height & Width of the window. -
Position
: Initial position of the window, first string determines X coordinates and the second one Y coordinates. Defaults toleft top
or0 0
.- X Coordinates:
left center right
or any number - Y Coordinated:
top center bottom
or any number
- X Coordinates:
-
resizable
: Disables resizing for the user, if set to false. -
maximizable
: Will stop the window from maximizing if set to false, and also will hide the maximize button. -
theme
&variant
. See theming.
<os-window
[minHeight]=300
[minWidth]=300
[height]=400
[width]=600
position="right bottom"
[resizable]="true"
[maximizable]="true">
</os-window>
I love buttons to use them you need to import them and then add them to the NgModule imports of your app.module.ts
:
import { OsButtonModule } from "@santinobch/os-window-angular";
...
@NgModule({
imports: [
OsButtonModule
]
})
To create a os-button you need to add the os-button
attribute to the button
or a
tag. This is the normal format of a button component instance:
<button os-button>
</button>
<a
href="google.com"
os-button>
</a>
-
disabled
, marks the button as disabled. -
theme
&variant
. See theming.
First add the module to the NgModule imports of your app.module.ts
:
import { OsRadioModule } from "@santinobch/os-window-angular"';
...
@NgModule({
imports: [
OsRadioModule
]
})
This is the normal structure of the os-radio
component
<os-radio>Test 1</os-radio>
-
labelPosition
: The component creates a<input type="radio">
and a<label>
sibling. The position of the label tag can be modified with thelabelPosition
attribute. Defaults toafter
. -
theme
&variant
. See theming.
-This component also accepts the attributes the <input type="radio">
tag supports:
name
ariaLabel
ariaLabel
ariaLabelledby
ariaDescribedby
checked
value
disabled
required
<!-- Label before radio input -->
<os-radio labelPosition="before">Test 1</os-radio>
<!-- Label after radio input -->
<os-radio labelPosition="after">Test 1</os-radio>