-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Sponsor component to SponsorSection
- Loading branch information
1 parent
cdb9853
commit 13f0b76
Showing
2 changed files
with
26 additions
and
31 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 |
---|---|---|
@@ -1,32 +1,19 @@ | ||
import { Section } from './Section'; | ||
import React from 'react'; | ||
import { sponsors } from '../../data/sponsors'; | ||
|
||
export const Sponsor = ({ logo, url }) => { | ||
const Sponsor = ({ logo, url }) => { | ||
return ( | ||
<a href={url} target={'_blank'}> | ||
<img src={logo} height={64} /> | ||
</a> | ||
); | ||
}; | ||
|
||
export const SponsorList = () => { | ||
const SponsorList = () => { | ||
return ( | ||
<> | ||
<ul | ||
className={'list-none flex flex-row items-center gap-8 sm:gap-16 p-0'} | ||
> | ||
<a | ||
href={'https://opencollective.com/mobx#sponsor'} | ||
className={ | ||
'bg-slate-300 hover:bg-blue-300 rounded-lg items-center flex flex-col px-4 py-2 hover:no-underline' | ||
} | ||
> | ||
<div className={'text-5xl'}>+</div> | ||
<div className={'text-sm sm:text-xl text-nowrap'}> | ||
Become a sponsor | ||
</div> | ||
</a> | ||
|
||
<ul className={'list-none flex flex-wrap items-center gap-8 p-0'}> | ||
{sponsors | ||
.filter((x) => x.active) | ||
.map((s) => ( | ||
|
@@ -53,3 +40,24 @@ export const SponsorList = () => { | |
</> | ||
); | ||
}; | ||
|
||
export function SponsorSection() { | ||
return ( | ||
<Section className={'bg-slate-100'} title={'Sponsors'}> | ||
<a | ||
href="https://opencollective.com/mobx/donate" | ||
target="_blank" | ||
className={'w-64 block'} | ||
> | ||
<img src="https://opencollective.com/mobx/donate/[email protected]?color=blue" /> | ||
</a> | ||
|
||
<div className={'text-xl my-8'}> | ||
We are very thankful to our sponsors to make us part of their{' '} | ||
<i>Open Source Software (OSS)</i> program. | ||
</div> | ||
|
||
<SponsorList /> | ||
</Section> | ||
); | ||
} |
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