Skip to content

Commit

Permalink
fix: pass autoAlign property to icon button (#3101)
Browse files Browse the repository at this point in the history
Signed-off-by: Akshat Patel <[email protected]>
  • Loading branch information
Akshat55 authored Feb 12, 2025
1 parent 2ca5954 commit bfdeb69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/code-snippet/code-snippet.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export enum SnippetType {
*ngIf="!skeleton"
[description]="showFeedback ? feedbackText : copyButtonDescription"
[align]="align"
[autoAlign]="autoAlign"
[dropShadow]="dropShadow"
[caret]="caret"
[highContrast]="highContrast"
Expand Down
10 changes: 8 additions & 2 deletions src/code-snippet/code-snippet.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ Inline.args = {
const MultiTemplate = (args) => ({
props: args,
template: `
<cds-code-snippet display="multi">{{snippet}}</cds-code-snippet>
<cds-code-snippet
display="multi"
[autoAlign]="true"
[copyButtonDescription]="copyButtonDescription">
{{snippet}}
</cds-code-snippet>
`
});
export const Multi = MultiTemplate.bind({});
Expand Down Expand Up @@ -102,7 +107,8 @@ Multi.args = {
"zone.js": "^0.8.26 || ^0.9.0 || ^0.10.0",
"@carbon/styles": "^1.2.0"
}
}`
}`,
copyButtonDescription: "Click to copy to clipboard!"
};
Multi.argTypes = {
maxCollapsedNumberOfRows: {
Expand Down

0 comments on commit bfdeb69

Please sign in to comment.