Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(buttons): remove solid-secondary button #456

Merged
merged 1 commit into from
Jul 12, 2021
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
5 changes: 1 addition & 4 deletions projects/canopy-test-app/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,6 @@
<a href="#" lg-button variant="solid-primary">Solid primary button</a>
<br />

<a href="#" lg-button variant="solid-secondary">Solid secondary button</a>
<br />

<a href="#" lg-button variant="outline-primary">Outline primary button</a>
<br />

Expand All @@ -348,7 +345,7 @@
</button>
<br />

<button lg-button variant="solid-secondary">
<button lg-button variant="solid-primary">
Button with icon
<lg-icon name="add"></lg-icon>
</button>
Expand Down
2 changes: 1 addition & 1 deletion projects/canopy/src/lib/button/button.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
}
}

$variants: 'solid-primary', 'solid-secondary', 'reverse-primary', 'reverse-secondary',
$variants: 'solid-primary', 'reverse-primary', 'reverse-secondary',
'outline-primary', 'outline-secondary', 'add-on' !default;

@each $variant in $variants {
Expand Down
1 change: 0 additions & 1 deletion projects/canopy/src/lib/button/button.interface.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export type ButtonVariant =
| 'solid-primary'
| 'solid-secondary'
| 'outline-primary'
| 'outline-secondary'
| 'reverse-primary'
Expand Down
3 changes: 1 addition & 2 deletions projects/canopy/src/lib/button/button.notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The \`iconButton\` property is used to visually hide that text.

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| \`\`variant\`\` | The variant of button: \`\`solid-primary\`\`, \`\`solid-secondary\`\`, \`\`outline-primary\`\`, \`\`outline-secondary\`\`, \`\`reverse-primary\`\`, \`\`reverse-secondary\`\`, \`\`add-on\`\`; | string | solid-primary | No |
| \`\`variant\`\` | The variant of button: \`\`solid-primary\`\`, \`\`outline-primary\`\`, \`\`outline-secondary\`\`, \`\`reverse-primary\`\`, \`\`reverse-secondary\`\`, \`\`add-on\`\`; | string | solid-primary | No |
| \`\`size\`\` | The size of the button | ButtonSize [\`\`sm\`\`, \`\`md\`\`] | \`\`md\`\` | No |
| \`\`fullWidth\`\` | If the button has to span full width or not. For 'sm' and 'md' sized screens, the button will always be full width and this input has no affect | boolean | false | No |
| \`\`disabled\`\` | Programmatically disable the button via this property | boolean | false | No |
Expand Down Expand Up @@ -85,7 +85,6 @@ In addition to \`\`lg-btn\`\`, one of the following is required to apply the spe
|------|-------------|
| \`\`lg-btn--add-on\`\` | Adds the add-on button styles for use inside an input field |
| \`\`lg-btn--solid-primary\`\` | Adds the solid primary button style |
| \`\`lg-btn--solid-secondary\`\` | Adds the solid secondary button style |
| \`\`lg-btn--outline-primary\`\` | Adds the outline primary button style |
| \`\`lg-btn--outline-secondary\`\` | Adds the outline secondary button style |
| \`\`lg-btn--reverse-primary\`\` | Adds the reverse primary button style |
Expand Down
6 changes: 0 additions & 6 deletions projects/canopy/src/lib/button/button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ButtonVariant, ButtonSize } from './button.interface';
const buttonVariants = [
'add-on',
'solid-primary',
'solid-secondary',
'outline-primary',
'outline-secondary',
'reverse-primary',
Expand Down Expand Up @@ -140,11 +139,6 @@ export const primaryButton = () =>
variant: 'solid-primary',
});

export const secondaryButton = () =>
createBtnStory({
variant: 'solid-secondary',
});

export const outlinePrimary = () =>
createBtnStory({
variant: 'outline-primary',
Expand Down
10 changes: 0 additions & 10 deletions projects/canopy/src/lib/forms/input/input.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ interface KnobsConfig {
label?: string;
showLabel?: boolean;
showButton?: boolean;
showSecondaryButton?: boolean;
showTextPrefix?: boolean;
showTextSuffix?: boolean;
size?: number;
Expand All @@ -55,7 +54,6 @@ const createInputStory = (config: KnobsConfig) => ({
[size]="size"
[suffix]="suffix"
[showButton]="showButton"
[showSecondaryButton]="showSecondaryButton"
[showTextPrefix]="showTextPrefix"
[showTextSuffix]="showTextSuffix"
></lg-reactive-form>
Expand Down Expand Up @@ -90,11 +88,6 @@ const createInputStory = (config: KnobsConfig) => ({
iconButton: boolean('icon button', true, contentGroupId),
showTextPrefix: boolean('show text prefix', config.showTextPrefix, contentGroupId),
showTextSuffix: boolean('show text suffix', config.showTextSuffix, contentGroupId),
showSecondaryButton: boolean(
'show secondary button',
config.showSecondaryButton,
contentGroupId,
),
suffix: text('suffix', '%', contentGroupId),
size: number('input size', 12, undefined, propsGroupId),
},
Expand All @@ -115,7 +108,6 @@ const createInputStory = (config: KnobsConfig) => ({
size="sm"
[iconButton]="true"
variant="add-on"
*ngIf="showSecondaryButton"
>
Close
<lg-icon name="close"></lg-icon>
Expand Down Expand Up @@ -159,7 +151,6 @@ class ReactiveFormComponent {
@Input() showLabel: boolean;
@Input() prefix: string;
@Input() showButton: boolean;
@Input() showSecondaryButton: boolean;
@Input() showTextPrefix: boolean;
@Input() showTextSuffix: boolean;
@Input() size: number;
Expand Down Expand Up @@ -231,5 +222,4 @@ export const withTextPrefix = () =>
export const withMultipleButtonSuffixes = () =>
createInputStory({
showButton: true,
showSecondaryButton: true,
});
2 changes: 1 addition & 1 deletion projects/canopy/src/lib/promo-card/promo-card.notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ This example contains only one promo card. Repeat as necessary.
fund care for you or a loved one.</p></div>
<div class="lg-promo-card-footer">
<button type="button"
class="lg-margin__bottom--none lg-btn--solid-secondary lg-btn">
class="lg-margin__bottom--none lg-btn--solid-primary lg-btn">
<span
class="lg-btn__text"> Find out more </span>
</button>
Expand Down
2 changes: 1 addition & 1 deletion projects/canopy/src/lib/promo-card/promo-card.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const createPromoCardListStory = (config: PromoCardListKnobsConfig) => ({
lgMarginBottom="none"
lg-button
type="button"
[variant]="variants[i] === 'solid-white' ? 'solid-secondary' : 'reverse-secondary'">
[variant]="variants[i] === 'solid-white' ? 'solid-primary' : 'reverse-secondary'">
{{ card.ctaText }}
</button>
</lg-promo-card-footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,4 @@
--btn-solid-primary-hover-color: var(--color-white);
--btn-solid-primary-hover-bg-color: var(--color-super-blue-dark);
--btn-solid-primary-hover-border-color: var(--color-super-blue-dark);

--btn-solid-secondary-bg-color: var(--color-leafy-green);
--btn-solid-secondary-border-color: var(--color-leafy-green);
--btn-solid-secondary-color: var(--color-white);
--btn-solid-secondary-active-bg-color: var(--color-leafy-green-darkest);
--btn-solid-secondary-active-border-color: var(--color-leafy-green-darkest);
--btn-solid-secondary-active-color: var(--color-white);
--btn-solid-secondary-hover-bg-color: var(--color-leafy-green-dark);
--btn-solid-secondary-hover-border-color: var(--color-leafy-green-dark);
--btn-solid-secondary-hover-color: var(--color-white);
}