-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
24,310 additions
and
37,406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
ftx-sivan-shared/src/lib/components/button/button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<button | ||
[type]="typeButton" | ||
[disabled]="disable" | ||
[ngClass]="{ '!bg-blue-700': disable }" | ||
[disabled]="!disable" | ||
[ngClass]="{ | ||
'bg-blue-500 cursor-pointer': disable, | ||
'bg-blue-700 cursor-not-allowed': !disable | ||
}" | ||
class="p-2 bg-blue-500 text-white" | ||
[class]="roundedFull" | ||
[attr.aria-label]="roundedFull" | ||
mat-button | ||
(click)="marian.emit()" | ||
class="mat-primary mat-raised-button !bg-blue-500 !text-white p-2" | ||
[className]="roundedFull" | ||
mat-ripple | ||
> | ||
<ng-content></ng-content> | ||
</button> | ||
<ng-template #element>tete</ng-template> |
51 changes: 26 additions & 25 deletions
51
ftx-sivan-shared/src/lib/components/button/button.component.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
import { Meta } from '@storybook/angular'; | ||
import { Meta, Story, StoryFn } from '@storybook/angular'; | ||
import { ButtonComponent } from './button.component'; | ||
import { action } from '@storybook/addon-actions'; | ||
|
||
export default { | ||
title: 'ButtonComponent', | ||
component: ButtonComponent, | ||
tags: ['autodocs'], | ||
} as Meta<ButtonComponent>; | ||
|
||
export const Primary = { | ||
render: (args: ButtonComponent) => ({ | ||
props: args, | ||
template: ` | ||
<ngx-button-component [disable]='disable' [roundedFull]='roundedFull' > | ||
TEST | ||
</ngx-button-component> | ||
export const Primary: StoryFn<ButtonComponent> = (args: ButtonComponent) => ({ | ||
props: args, | ||
template: ` | ||
<sivan-button-component [disable]='disable' [roundedFull]='roundedFull' (marian)="marian()" > | ||
Click Me | ||
</sivan-button-component> | ||
`, | ||
}), | ||
args: { | ||
roundedFull: '!rounded-md', | ||
disable: true, | ||
methods: { | ||
marian() { | ||
console.log('test'); | ||
}, | ||
}, | ||
}; | ||
export const PrimaryEnable = { | ||
render: (args: ButtonComponent) => ({ | ||
props: args, | ||
template: ` | ||
<ngx-button-component [disable]='disable' [roundedFull]='roundedFull' > | ||
TEST | ||
</ngx-button-component > | ||
`, | ||
}), | ||
args: { | ||
roundedFull: '!rounded-full', | ||
disable: false, | ||
}); | ||
|
||
export const ButtonWithDocs = Primary.bind({}); | ||
|
||
ButtonWithDocs.argTypes = { | ||
roundedFull: { | ||
control: 'select', // Type 'select' is automatically inferred when 'options' is defined | ||
options: ['rounded-s', 'rounded-md', 'rounded-xl', 'rounded-full'], | ||
defaultValue: 'rounded-s', | ||
}, | ||
disable: { | ||
options: [true, false], | ||
control: { type: 'radio' }, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.