Skip to content

Commit 36affae

Browse files
authored
Merge pull request #1059 from db-ui/1057-checkbox-power-app-component
feat(power apps): added checkbox component
2 parents 4463d27 + 7de7223 commit 36affae

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

build-power-apps/DBUI/DBUI.cdsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
<ProjectReference Include="..\input\DBInput.pcfproj" />
5050
<ProjectReference Include="..\alert\DBAlert.pcfproj" />
5151
<ProjectReference Include="..\link\DBLink.pcfproj" />
52+
<ProjectReference Include="..\checkbox\DBCheckbox.pcfproj" />
5253
<ProjectReference Include="..\radio\DBRadio.pcfproj" />
5354
<ProjectReference Include="..\infotext\DBInfotext.pcfproj" />
5455
</ItemGroup>

packages/components/src/components/checkbox/checkbox.lite.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,18 @@ useMetadata({
1414
isAttachedToShadowDom: true,
1515
component: {
1616
// MS Power Apps
17-
includeIcon: false,
17+
includeIcon: true,
1818
hasDisabledProp: true,
19-
properties: []
19+
properties: [
20+
// jscpd:ignore-start
21+
{ name: 'children', type: 'SingleLine.Text' },
22+
{ name: 'name', type: 'SingleLine.Text' },
23+
// { name: 'checked', type: 'TwoOptions' },
24+
{ name: 'value', type: 'SingleLine.Text', onChange: 'value' }, // $event.target["value"|"checked"|...]
25+
// { name: 'disabled', type: 'TwoOptions' },
26+
{ name: 'id', type: 'SingleLine.Text' }
27+
// jscpd:ignore-end
28+
]
2029
}
2130
});
2231

packages/components/src/components/checkbox/checkbox.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ $font-size-height: calc(var(--db-base-font-size) * var(--db-base-line-height));
2626
height: $font-size-height;
2727
justify-content: center;
2828

29+
// TODO: probably extract this to an overwrite or external file
30+
// workarounds for power apps
31+
width: auto;
32+
padding: 0;
33+
2934
// We need to reset the general icons margin, as we want to use it in a tiny space
3035
&:checked,
3136
&:indeterminate {

0 commit comments

Comments
 (0)