-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e20ddab
commit e425828
Showing
4 changed files
with
148 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,65 @@ | ||
import React, { ReactNode } from "react"; | ||
import Slider from "../Slider"; | ||
import React from "react"; | ||
import Slider from "../Slider.tsx"; | ||
import Icon from "../Icon.tsx"; | ||
|
||
export default { | ||
title: "Components/Slider", | ||
component: Slider, | ||
parameters: { | ||
layout: "fullscreen", | ||
}, | ||
tags: ["autodocs"], | ||
}; | ||
const Slide = ({ name }: { name: string }) => ( | ||
<div className="relative "> | ||
<div className="relative mx-auto w-full sm:w-[560px] md:w-[784px] lg:w-[960px] bg-white overflow-hidden flex gap-40 rounded-3xl shadow-container-subtle"> | ||
<div className="w-full md:w-2/3 flex flex-col gap-24 pr-40 md:pr-0 pt-40 pl-40 pb-40 sm:pb-[120px] md:pb-40"> | ||
<h2 className="ui-text-h2 font-medium text-neutral-1000"> | ||
“Ably seamlessly absorbs sudden bursts in load during unexpected | ||
client events. The integration was easy and we were live in under a | ||
month.” | ||
</h2> | ||
<div className="flex flex-col sm:flex-row gap-32"> | ||
<div className="flex gap-8"> | ||
<div className="static self-center sm:absolute sm:-bottom-48 sm:-right-[56px] rounded-full bg-gradient-to-l from-neutral-200 to-50% to-neutral-500 w-[48px] h-[48px] sm:w-[201px] sm:h-[201px] md:w-[257px] md:h-[257px] lg:w-[280px] lg:h-[280px] overflow-hidden flex items-center justify-center sm:border-[16px] border-neutral-200"> | ||
{/* <GatsbyImage /> */} | ||
</div> | ||
<div className="sm:py-16"> | ||
<p className="ui-text-p1 text-neutral-1300">{name}</p> | ||
<p className="ui-text-p3 text-neutral-800"> | ||
Co-Founder & Technical Leader | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div className="w-[80px] h-1 sm:w-1 sm:h-full bg-neutral-500"></div> | ||
<div className="flex items-center gap-4"> | ||
{/* <GatsbyImage /> */} | ||
<p className="ui-text-h4 font-bold">Mentimeter</p> | ||
</div> | ||
</div> | ||
<a href="/case-study" className="ui-btn self-start"> | ||
Read case study | ||
<Icon | ||
name="icon-gui-arrow-right" | ||
size="1.25rem" | ||
additionalCSS="ml-4" | ||
/> | ||
</a> | ||
</div> | ||
</div> | ||
|
||
const Slide = ({ children }: { children: ReactNode }) => ( | ||
<div className="h-full p-24 bg-white rounded"> | ||
<p className="ui-text-p2 text-center">{children}</p> | ||
<div className="absolute h-256 -z-10 -bottom-48 -left-36 w-1/5 rounded-full blur-xl opacity-50 transform -rotate-45 bg-gradient-to-bl from-bg-glow-green to-bg-glow-teal"></div> | ||
<div className="absolute h-256 -z-10 -top-48 -right-48 w-3/5 rounded-full blur-xl opacity-50 transform rotate-12 bg-gradient-to-br from-bg-glow-green to-bg-glow-teal"></div> | ||
</div> | ||
); | ||
|
||
const slides = [ | ||
<Slide key="1"> | ||
Powers live chat, updates, analytics, and composition for millions of users. | ||
</Slide>, | ||
<Slide key="2"> | ||
Powers virtual venues for millions of event attendees around the world. | ||
</Slide>, | ||
<Slide key="3"> | ||
Provides 5 million daily users with live financial commentary and stock | ||
tickers. | ||
</Slide>, | ||
<Slide key="4">Monitors live car performance data across the USA.</Slide>, | ||
<Slide key="1" name={"Johan Bengtsson"} />, | ||
<Slide key="2" name={"Mirko Bergman"} />, | ||
<Slide key="3" name={"Stefania Lombardo"} />, | ||
<Slide key="4" name={"Aleksandar Kostadinov"} />, | ||
]; | ||
|
||
export const SliderOnAllBreakpoints = { | ||
export default { | ||
title: "Components/Slider", | ||
component: Slider, | ||
args: { | ||
slides, | ||
children: slides, | ||
interval: 15000, | ||
}, | ||
}; | ||
|
||
export const SliderOnSmallBreakpointOnly = { | ||
args: { | ||
slides, | ||
classes: `sm:grid-cols-${slides.length / 2} md:grid-cols-${slides.length}`, | ||
mqEnableThreshold: () => !window.matchMedia("(min-width: 48rem)").matches, | ||
}, | ||
}; | ||
export const Default = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
.ui-slider-marker { | ||
font-size: 0.5rem; | ||
top: -1px; | ||
|
||
@apply leading-none px-4 relative; | ||
@keyframes fillAnimation { | ||
0% { | ||
width: 0%; | ||
} | ||
100% { | ||
width: 100%; | ||
} | ||
} |
Oops, something went wrong.