Skip to content

Commit

Permalink
Add email back as social option
Browse files Browse the repository at this point in the history
  • Loading branch information
edlu77 committed Jan 14, 2025
1 parent d48a66e commit d4f95ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<a [href]="link()" target="_blank" rel="noopener noreferrer">
<mat-icon [class.small]="size() === 'small'" [svgIcon]="icon()"></mat-icon>
@if (name() === 'email') {
<mat-icon [class.small]="size() === 'small'">email</mat-icon>
} @else {
<mat-icon [class.small]="size() === 'small'" [svgIcon]="icon()"></mat-icon>
}
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
border-radius: 100%;
width: 3rem;
height: 3rem;
font-size: 3rem;
outline-color: transparent;

&.small {
width: 2.25rem;
height: 2.25rem;
font-size: 2.25rem;
}

&:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co
import { MatIconModule } from '@angular/material/icon';

/** Social media name type */
export type SocialMediaName = 'x' | 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'github';
export type SocialMediaName = 'x' | 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'email' | 'github';
/** Button size type */
export type SocialMediaButtonSize = 'small' | 'large';

Expand All @@ -14,6 +14,7 @@ export const SOCIAL_LINKS: Record<SocialMediaName, string> = {
instagram: 'https://www.instagram.com/cns_at_iu/',
youtube: 'https://www.youtube.com/@CNSCenter/',
linkedin: 'https://www.linkedin.com/company/cns-indiana-university-bloomington',
email: 'mailto:infoccf@iu.edu',
github: 'https://github.com/hubmapconsortium/hra-ui',
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { provideHttpClient } from '@angular/common/http';
import { provideIcons } from '@hra-ui/cdk/icons';
import { provideDesignSystem } from '@hra-ui/design-system';
import { applicationConfig, Meta, StoryObj } from '@storybook/angular';

import { SocialMediaButtonComponent } from './social-media-button.component';
Expand All @@ -15,7 +14,7 @@ const meta: Meta<SocialMediaButtonComponent> = {
},
decorators: [
applicationConfig({
providers: [provideHttpClient(), provideIcons()],
providers: [provideDesignSystem()],
}),
],
};
Expand All @@ -30,7 +29,7 @@ export const Default: Story = {
argTypes: {
name: {
control: 'select',
options: ['github', 'facebook', 'instagram', 'linkedin', 'x', 'youtube'],
options: ['email', 'github', 'facebook', 'instagram', 'linkedin', 'x', 'youtube'],
},
size: {
control: 'select',
Expand Down

0 comments on commit d4f95ae

Please sign in to comment.