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

Add links to each gesture on landing in docs #2763

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ interface Props {
title: string;
component?: React.ReactNode;
idx: number;
href: string;
}

const GestureExampleItem = ({ title, component, idx }: Props) => {
const GestureExampleItem = ({ title, component, idx, href }: Props) => {
return (
<>
<div className={styles.exampleContainer}>
<h2 className={styles.title}>{title}</h2>
<a className={styles.title} href={href}>
{title}
</a>
<div className={styles.interactiveExampleWrapper}>
<InteractiveExampleComponent idx={idx} component={component} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
.title {
font-size: 20px;
font-weight: 400;
display: block;
text-align: center;
margin-bottom: 2rem;
}
Expand Down
1 change: 1 addition & 0 deletions docs/src/components/GestureFeatures/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[data-theme='dark'] .featuresButton:hover {
background-color: var(--swm-purple-light-100);
border-color: var(--swm-purple-light-100);
color: var(--swm-off-white);
}

.featuresButton svg {
Expand Down
7 changes: 7 additions & 0 deletions docs/src/components/Playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,32 @@ const examples = [
{
title: 'Gesture.Pan()',
component: <PanExample />,
href: 'docs/gestures/pan-gesture',
},
{
title: 'Gesture.Tap()',
component: <TapExample />,
href: 'docs/gestures/tap-gesture',
},
{
title: 'Gesture.Rotation()',
component: <RotationExample />,
href: 'docs/gestures/rotation-gesture',
},
{
title: 'Gesture.Fling()',
component: <FlingExample />,
href: 'docs/gestures/fling-gesture',
},
{
title: 'Gesture.LongPress()',
component: <LongPressExample />,
href: 'docs/gestures/long-press-gesture',
},
{
title: 'Gesture.Pinch()',
component: <PinchExample />,
href: 'docs/gestures/pinch-gesture',
},
];

Expand All @@ -51,6 +57,7 @@ const Playground = () => {
idx={idx}
title={example.title}
component={example.component}
href={example.href}
/>
))}
</div>
Expand Down
Loading