Skip to content

Commit bfdeb69

Browse files
authored
fix: pass autoAlign property to icon button (#3101)
Signed-off-by: Akshat Patel <[email protected]>
1 parent 2ca5954 commit bfdeb69

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/code-snippet/code-snippet.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export enum SnippetType {
9292
*ngIf="!skeleton"
9393
[description]="showFeedback ? feedbackText : copyButtonDescription"
9494
[align]="align"
95+
[autoAlign]="autoAlign"
9596
[dropShadow]="dropShadow"
9697
[caret]="caret"
9798
[highContrast]="highContrast"

src/code-snippet/code-snippet.stories.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ Inline.args = {
6464
const MultiTemplate = (args) => ({
6565
props: args,
6666
template: `
67-
<cds-code-snippet display="multi">{{snippet}}</cds-code-snippet>
67+
<cds-code-snippet
68+
display="multi"
69+
[autoAlign]="true"
70+
[copyButtonDescription]="copyButtonDescription">
71+
{{snippet}}
72+
</cds-code-snippet>
6873
`
6974
});
7075
export const Multi = MultiTemplate.bind({});
@@ -102,7 +107,8 @@ Multi.args = {
102107
"zone.js": "^0.8.26 || ^0.9.0 || ^0.10.0",
103108
"@carbon/styles": "^1.2.0"
104109
}
105-
}`
110+
}`,
111+
copyButtonDescription: "Click to copy to clipboard!"
106112
};
107113
Multi.argTypes = {
108114
maxCollapsedNumberOfRows: {

0 commit comments

Comments
 (0)