Skip to content

Commit

Permalink
Merge pull request #23 from plastic-labs/dm/drop-contact-prompts
Browse files Browse the repository at this point in the history
allow no prompt on giant links; remove them
  • Loading branch information
mckelvey authored Dec 4, 2024
2 parents 58f2182 + 024b6d2 commit 0a45ac5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions components/composed/contact/contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ export const Contact: React.FC<ContactProps> = props => {
<LinkGiant
href="https://discord.gg/plasticlabs"
inverse
prompt="To connect with Plastic Labs"
text="Join Discord"
title="Contact"
/>
<Divider />
<LinkGiant
href="mailto:[email protected]"
inverse
prompt="For other inquiries"
text="Email [email protected]"
title="Inquire"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const meta = {
description: 'The link prompt',
table: {
defaultValue: {
summary: '[required]',
summary: 'undefined',
},
type: {
summary: 'string',
Expand Down Expand Up @@ -131,7 +131,7 @@ export const LinkGiant: Story = {
args: {
href: 'https://plasticlabs.ai',
inverse: false,
prompt: 'You very much want to click this',
prompt: '',
text: 'Link Giant',
title: 'This is a link',
},
Expand Down
4 changes: 2 additions & 2 deletions components/interactive/links/link-giant/link-giant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const LinkGiant: React.FC<LinkGiantProps> = ({
title,
...props
}) => {
if (!prompt || !text || !title) {
if (!text || !title) {
return null
}

Expand All @@ -156,7 +156,7 @@ export const LinkGiant: React.FC<LinkGiantProps> = ({
<StyledTitle variant="Body1">{title}</StyledTitle>
<IconUpRightArrow />
<StyledDetails>
<StyledPrompt variant="Body1">{prompt}</StyledPrompt>
{prompt ? <StyledPrompt variant="Body1">{prompt}</StyledPrompt> : null}
<Text variant="Body1">{text}</Text>
</StyledDetails>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface LinkGiantProps
extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>,
LinkProps,
SharedThemeProps {
prompt: string
prompt?: string
text: string
title: string
}

0 comments on commit 0a45ac5

Please sign in to comment.