Skip to content

Commit

Permalink
rebuilt project, renamed to shape ,as style is a reserved name
Browse files Browse the repository at this point in the history
  • Loading branch information
verena-ifx authored and verena-ifx committed Sep 11, 2023
1 parent ce56633 commit 7dd55a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IfxIconButton } from '@infineon/infineon-design-system-react';
function IconButton() {
return (
<div>
<IfxIconButton style="round" variant="primary" icon="calendar16" href="http://google.com" target="_blank" size="s" disabled="true"></IfxIconButton>
<IfxIconButton shape="round" variant="primary" icon="calendar16" href="http://google.com" target="_blank" size="s" disabled="true"></IfxIconButton>
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
icon: "c-info-24",
href: "",
target: '_blank',
style: 'round'
shape: 'round'
},

argTypes: {
Expand All @@ -36,7 +36,7 @@ export default {


const DefaultTemplate = (args) =>
`<ifx-icon-button style="${args.style}" variant="${args.variant}" icon="${args.icon}" href="${args.href}" target="${args.target}" size="${args.size}" disabled="${args.disabled}">
`<ifx-icon-button shape="${args.shape}" variant="${args.variant}" icon="${args.icon}" href="${args.href}" target="${args.target}" size="${args.size}" disabled="${args.disabled}">
</ifx-icon-button>`;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class IconButton {
@Prop() icon: string;
@Prop() href: string;
@Prop() target: string = '_self';
@Prop() style: string = 'round';
@Prop() shape: string = 'round';
@Element() el;

private focusableElement: HTMLElement;
Expand All @@ -25,8 +25,8 @@ export class IconButton {
}

componentWillLoad() {
if (this.style === '') {
this.style = 'round';
if (this.shape === '') {
this.shape = 'round';
}
}

Expand Down Expand Up @@ -81,7 +81,7 @@ export class IconButton {
getClassNames() {
return classNames(
'btn icon-button',
`btn-${this.style}`,
`btn-${this.shape}`,
this.size && `btn-${this.getSizeClass()}`,
`btn-${this.getVariantClass()}`,
this.disabled ? 'disabled' : ''
Expand Down

0 comments on commit 7dd55a2

Please sign in to comment.