Skip to content

Commit

Permalink
removing selectable searchguidelink
Browse files Browse the repository at this point in the history
  • Loading branch information
eniomoura committed Oct 4, 2024
1 parent 60e6ff4 commit 9c554e3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 deletions.
14 changes: 0 additions & 14 deletions docs/examples/searchguidelink/selectedStateExample.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions docs/pages/web/searchguidelink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import colors from '../../examples/searchguidelink/colors';
import hideLowQualityDo from '../../examples/searchguidelink/hideLowQualityDo';
import main from '../../examples/searchguidelink/main';
import noScrollDo from '../../examples/searchguidelink/noScrollDo';
import selectedStateExample from '../../examples/searchguidelink/selectedStateExample';
import serialDo from '../../examples/searchguidelink/serialDo';
import showLowQualityDont from '../../examples/searchguidelink/showLowQualityDont';
import singleDont from '../../examples/searchguidelink/singleDont';
Expand Down Expand Up @@ -272,24 +271,6 @@ Also consider:
}
/>
</MainSection.Subsection>
<MainSection.Subsection
columns={2}
description={`
Use the \`selected\` prop to indicate that the Searchguide is in a selected state.
`}
title="States"
>
<MainSection.Card
cardSize="md"
sandpackExample={
<SandpackExample
code={selectedStateExample}
name="Selected state searchguide example."
previewHeight={150}
/>
}
/>
</MainSection.Subsection>
</MainSection>
<MainSection name="Writing">
<MainSection.Subsection columns={2}>
Expand Down
23 changes: 2 additions & 21 deletions packages/gestalt/src/SearchGuideLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ type Props = {
* Available for testing purposes, if needed. Consider [better queries](https://testing-library.com/docs/queries/about/#priority) before using this prop.
*/
dataTestId?: string;
/**
* Toggles between binary states: on/off, selected/unselected, open/closed. See the [selected](#Selected-state) variant to learn more. See the [state variant](https://gestalt.pinterest.systems/web/searchguide#State) for details on proper usage.
*/
selected?: boolean;
/**
* Text to render inside the SearchGuideLink to convey the function and purpose of the SearchGuideLink.
*
Expand Down Expand Up @@ -82,7 +78,6 @@ const SearchGuideLinkWithForwardRef = forwardRef<HTMLAnchorElement, Props>(funct
color = '01',
dataTestId,
onClick,
selected = false,
text,
thumbnail,
href,
Expand All @@ -106,11 +101,7 @@ const SearchGuideLinkWithForwardRef = forwardRef<HTMLAnchorElement, Props>(funct
const childrenDivClasses = classnames(styles.childrenDiv);

const textComponent = (
<TextUI
align="center"
color={isInVRExperiment && selected ? 'inverse' : 'dark'}
overflow="noWrap"
>
<TextUI align="center" color="dark" overflow="noWrap">
{text}
</TextUI>
);
Expand All @@ -127,16 +118,7 @@ const SearchGuideLinkWithForwardRef = forwardRef<HTMLAnchorElement, Props>(funct
</Box>
)}
{'image' in thumbnail && (
<div
className={
isInVRExperiment
? classnames({
[styles.imageDivVr]: !selected,
[styles.selectedImageDivVr]: selected,
})
: styles.imageDiv
}
>
<div className={isInVRExperiment ? styles.imageDivVr : styles.imageDiv}>
{cloneElement(thumbnail.image, { fit: 'cover' })}
</div>
)}
Expand Down Expand Up @@ -175,7 +157,6 @@ const SearchGuideLinkWithForwardRef = forwardRef<HTMLAnchorElement, Props>(funct
href={href}
onClick={handleClick}
rel={rel}
selected={selected}
tabIndex={tabIndex}
target={target}
wrappedComponent="searchGuide"
Expand Down

0 comments on commit 9c554e3

Please sign in to comment.