-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
7 changed files
with
169 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
import PaymentButton from '../Payment/PaymentButton.astro'; | ||
type Props = astroHTML.JSX.IntrinsicElements['button']; | ||
--- | ||
|
||
<PaymentButton class="klarna" /> | ||
|
||
<style lang="scss"> | ||
.klarna { | ||
background-color: hsl(344, 100%, 85%); | ||
|
||
&:hover { | ||
background-color: hsl(344, 94%, 87%); | ||
} | ||
|
||
&:active { | ||
background-color: hsl(344, 90%, 90%); | ||
} | ||
} | ||
</style> |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
import PaymentButton from './PaymentButton.astro'; | ||
type Props = astroHTML.JSX.IntrinsicElements['button']; | ||
--- | ||
|
||
<PaymentButton class="paypal" /> | ||
|
||
<style lang="scss"> | ||
.paypal { | ||
background-color: hsl(42 100% 61%); | ||
|
||
&:hover { | ||
background-color: hsl(42 100% 50%); | ||
} | ||
|
||
&:active { | ||
background-color: hsl(42 100% 40%); | ||
} | ||
} | ||
</style> |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
type Props = astroHTML.JSX.IntrinsicElements['button']; | ||
--- | ||
|
||
<button {...Astro.props}>Pay</button> | ||
|
||
<style lang="scss"> | ||
button { | ||
background-color: hsl(0, 0%, 90%); | ||
border: 0; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
font-size: 16px; | ||
height: 48px; | ||
padding: 16px; | ||
transition: background-color 0.15s; | ||
|
||
&:hover { | ||
background-color: hsl(0, 0%, 85%); | ||
} | ||
|
||
&:active { | ||
background-color: hsl(0, 0%, 80%); | ||
} | ||
} | ||
</style> |
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
type Props = astroHTML.JSX.IntrinsicElements['details'] & { | ||
label: string; | ||
logo: string; | ||
}; | ||
const { children, label, logo, ...props } = Astro.props; | ||
--- | ||
|
||
<details {...props}> | ||
<summary> | ||
<img src={logo} /> | ||
{label} | ||
</summary> | ||
<div> | ||
<slot /> | ||
</div> | ||
</details> | ||
|
||
<style lang="scss"> | ||
details { | ||
border: 1px solid #e0e0e0; | ||
border-radius: 8px; | ||
display: flex; | ||
overflow: hidden; | ||
place-content: center; | ||
place-items: center; | ||
} | ||
|
||
summary { | ||
box-sizing: border-box; | ||
cursor: pointer; | ||
display: flex; | ||
gap: 12px; | ||
height: 48px; | ||
padding: 16px; | ||
place-items: center; | ||
transition: background-color 0.15s; | ||
|
||
&:hover { | ||
background-color: hsl(0 0% 90%); | ||
} | ||
|
||
&:active { | ||
background-color: hsl(0 0% 80%); | ||
} | ||
|
||
&:before { | ||
content: ''; | ||
border: 1px solid #757575; | ||
border-radius: 100vw; | ||
padding: 4px; | ||
height: 20px; | ||
width: 20px; | ||
|
||
[open] > & { | ||
background: radial-gradient(#212121 50%, transparent 55%); | ||
} | ||
} | ||
} | ||
|
||
img { | ||
aspect-ratio: 2/1; | ||
width: 56px; | ||
} | ||
|
||
div { | ||
box-sizing: border-box; | ||
display: grid; | ||
padding: 16px; | ||
} | ||
</style> |
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
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