Skip to content

Commit

Permalink
Merge pull request #1059 from db-ui/1057-checkbox-power-app-component
Browse files Browse the repository at this point in the history
feat(power apps): added checkbox component
  • Loading branch information
mfranzke authored May 31, 2023
2 parents 4463d27 + 7de7223 commit 36affae
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions build-power-apps/DBUI/DBUI.cdsproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<ProjectReference Include="..\input\DBInput.pcfproj" />
<ProjectReference Include="..\alert\DBAlert.pcfproj" />
<ProjectReference Include="..\link\DBLink.pcfproj" />
<ProjectReference Include="..\checkbox\DBCheckbox.pcfproj" />
<ProjectReference Include="..\radio\DBRadio.pcfproj" />
<ProjectReference Include="..\infotext\DBInfotext.pcfproj" />
</ItemGroup>
Expand Down
13 changes: 11 additions & 2 deletions packages/components/src/components/checkbox/checkbox.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@ useMetadata({
isAttachedToShadowDom: true,
component: {
// MS Power Apps
includeIcon: false,
includeIcon: true,
hasDisabledProp: true,
properties: []
properties: [
// jscpd:ignore-start
{ name: 'children', type: 'SingleLine.Text' },
{ name: 'name', type: 'SingleLine.Text' },
// { name: 'checked', type: 'TwoOptions' },
{ name: 'value', type: 'SingleLine.Text', onChange: 'value' }, // $event.target["value"|"checked"|...]
// { name: 'disabled', type: 'TwoOptions' },
{ name: 'id', type: 'SingleLine.Text' }
// jscpd:ignore-end
]
}
});

Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/components/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ $font-size-height: calc(var(--db-base-font-size) * var(--db-base-line-height));
height: $font-size-height;
justify-content: center;

// TODO: probably extract this to an overwrite or external file
// workarounds for power apps
width: auto;
padding: 0;

// We need to reset the general icons margin, as we want to use it in a tiny space
&:checked,
&:indeterminate {
Expand Down

0 comments on commit 36affae

Please sign in to comment.