Skip to content

Commit ba9d3d1

Browse files
authored
Extract colspan from components (ocaml#539)
1 parent f07525c commit ba9d3d1

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/Footer.res

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ module LogoSection = {
3939
type t = {ocamlSummary: string}
4040

4141
@react.component
42-
let make = (~content, ~colspan) =>
43-
<div className={"space-y-8 " ++ colspan}>
42+
let make = (~content) =>
43+
<div className="space-y-8">
4444
<img className="h-10" src="/static/ocaml-logo.jpeg" alt="OCaml" />
4545
<P> {React.string(content.ocamlSummary)} </P>
4646
{
@@ -111,8 +111,8 @@ module MainLinksSection = {
111111
}
112112

113113
@react.component
114-
let make = (~content, ~colspan) =>
115-
<div className={"grid grid-cols-2 gap-8 " ++ colspan}>
114+
let make = (~content) =>
115+
<div className={"grid grid-cols-2 gap-8"}>
116116
<div className="md:grid md:grid-cols-2 md:gap-8">
117117
{
118118
let section = content.principlesSection
@@ -183,9 +183,9 @@ type t = {
183183
let make = (~content) =>
184184
<FooterContainer footerLabel=content.footer>
185185
<div className="xl:grid xl:grid-cols-3 xl:gap-8">
186-
<LogoSection content=content.logoContent colspan="xl:col-span-1" />
187-
<div className="mt-12 xl:mt-0">
188-
<MainLinksSection content=content.mainLinksContent colspan="xl:col-span-2" />
186+
<div className="xl:col-span-1"> <LogoSection content=content.logoContent /> </div>
187+
<div className="mt-12 xl:mt-0 xl:col-span-2">
188+
<MainLinksSection content=content.mainLinksContent />
189189
</div>
190190
</div>
191191
<div className=`mt-10`> <SponsorsSection content=content.sponsorContent /> </div>

src/LogoCloud.res

+2-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ module CompanyCard = {
4040
// TODO: accessibility - should the link include the div or only the contents?
4141
// TODO: accessibility - warn opening a new tab
4242
<a href=website target="_blank" className="py-1 px-1">
43-
<div
44-
className="col-span-1 flex justify-center items-center space-x-8 py-8 px-4 bg-gray-50 h-40">
43+
<div className="flex justify-center items-center space-x-8 py-8 px-4 bg-gray-50 h-40">
4544
{switch company {
4645
| #Optional({logoSrc: Some(logoSrc)}) => logo(~src=logoSrc, ~name)
4746
| #Optional(_) => logoFiller
@@ -66,7 +65,7 @@ let make = (~companies) =>
6665
{switch companies {
6766
| #LogoOnly(companies) =>
6867
companies->Js.Array2.map((c: Company.t) =>
69-
<CompanyCard key=c.name company={#Required(c)} />
68+
<div className="col-span-1"> <CompanyCard key=c.name company={#Required(c)} /> </div>
7069
)
7170
| #LogoWithText(companies) =>
7271
companies->Js.Array2.map((c: CompanyOptionalLogo.t) =>

0 commit comments

Comments
 (0)