Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions samples/inputs/chip/multiple/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ export default class ChipMultiple extends React.Component<any, any> {
);
}

private handleChipRemove = (event: CustomEvent<boolean>) => {
const chip = event.target as IgrChip;
chip.remove();
}

public render(): JSX.Element {
return (
<div className="container sample">
<div className="container" style={{flexDirection: "row", gap: "8px"}}>
<IgrChip selectable={true} removable={true} >
<IgrChip selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span slot="select">
<IgrIcon name="custom-select" collection="material"></IgrIcon>
</span>
Expand All @@ -45,7 +50,7 @@ export default class ChipMultiple extends React.Component<any, any> {
<IgrIcon name="custom-remove" collection="material"></IgrIcon>
</span>
</IgrChip>
<IgrChip removable={true}>
<IgrChip removable={true} onRemove={this.handleChipRemove}>
<span slot="start">
<IgrIcon name="brush" collection="material"></IgrIcon>
</span>
Expand Down
7 changes: 6 additions & 1 deletion samples/inputs/chip/overview/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ export default class ChipOverview extends React.Component<any, any> {
super(props);
}

private handleChipRemove = (event: CustomEvent<boolean>) => {
const chip = event.target as IgrChip;
chip.remove();
}

public render(): JSX.Element {
return (
<div className="container sample">
<IgrChip selectable={true} removable={true}>
<IgrChip selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Chip</span>
</IgrChip>
</div>
Expand Down
11 changes: 8 additions & 3 deletions samples/inputs/chip/size/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,21 @@ export default class ChipSize extends React.Component<any, any> {
super(props);
}

private handleChipRemove = (event: CustomEvent<boolean>) => {
const chip = event.target as IgrChip;
chip.remove();
}

public render(): JSX.Element {
return (
<div className="container sample" style={{flexDirection: "row", gap: "8px", alignItems: "baseline"}}>
<IgrChip className="size-small" selectable={true} removable={true}>
<IgrChip className="size-small" selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Chip</span>
</IgrChip>
<IgrChip className="size-medium" selectable={true} removable={true}>
<IgrChip className="size-medium" selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Chip</span>
</IgrChip>
<IgrChip className="size-large" selectable={true} removable={true}>
<IgrChip className="size-large" selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Chip</span>
</IgrChip>
</div>
Expand Down
7 changes: 6 additions & 1 deletion samples/inputs/chip/styling/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ export default class ChipStyling extends React.Component<any, any> {
super(props);
}

private handleChipRemove = (event: CustomEvent<boolean>) => {
const chip = event.target as IgrChip;
chip.remove();
}

public render(): JSX.Element {
return (
<div className="container sample" style={{flexDirection: "row", gap: "8px"}}>
<IgrChip selectable={true} removable={true}>
<IgrChip selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Chip</span>
</IgrChip>
</div>
Expand Down
15 changes: 10 additions & 5 deletions samples/inputs/chip/variants/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,27 @@ export default class ChipVariants extends React.Component<any, any> {
super(props);
}

private handleChipRemove = (event: CustomEvent<boolean>) => {
const chip = event.target as IgrChip;
chip.remove();
}

public render(): JSX.Element {
return (
<div className="container sample" style={{flexDirection: "row", gap: "8px", alignItems: "baseline"}}>
<IgrChip variant="primary" selectable={true} removable={true}>
<IgrChip variant="primary" selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Primary</span>
</IgrChip>
<IgrChip variant="info" selectable={true} removable={true}>
<IgrChip variant="info" selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Info</span>
</IgrChip>
<IgrChip variant="success" selectable={true} removable={true}>
<IgrChip variant="success" selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Success</span>
</IgrChip>
<IgrChip variant="warning" selectable={true} removable={true}>
<IgrChip variant="warning" selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Warning</span>
</IgrChip>
<IgrChip variant="danger" selectable={true} removable={true}>
<IgrChip variant="danger" selectable={true} removable={true} onRemove={this.handleChipRemove}>
<span>Danger</span>
</IgrChip>
</div>
Expand Down