-
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.
Merge pull request #134 from ably/add-customer-logos-component
Add customer logos component
- Loading branch information
Showing
22 changed files
with
206 additions
and
11 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,7 +1,7 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
ably-ui (5.2.0) | ||
ably-ui (5.2.0.dev.a4067b7) | ||
view_component (~> 2.33.0) | ||
|
||
GEM | ||
|
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,3 +1,3 @@ | ||
module AblyUi | ||
VERSION = '5.2.0' | ||
VERSION = '5.2.0.dev.a4067b7' | ||
end |
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 |
---|---|---|
|
@@ -31,6 +31,7 @@ module.exports = [ | |
"CookieMessage", | ||
"Icon", | ||
"Slider", | ||
"CustomerLogos", | ||
], | ||
}, | ||
{ | ||
|
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
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
44 changes: 44 additions & 0 deletions
44
preview/app/views/components/customer_logos_react.html.erb
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,44 @@ | ||
<%= render(TitleComponent.new(react: true, vw: true)) do %> | ||
Customer logos | ||
<% end %> | ||
|
||
<% | ||
companies = [ | ||
{ | ||
label: 'Hubspot', | ||
logo: | ||
asset_path('ably_ui/core/images/cust-logo-hubspot-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Hopin', | ||
logo: asset_path('ably_ui/core/images/cust-logo-hopin-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Bloomberg', | ||
logo: | ||
asset_path('ably_ui/core/images/cust-logo-bloomberg-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Toyota', | ||
logo: | ||
asset_path('ably_ui/core/images/cust-logo-toyota-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Split', | ||
logo: asset_path('ably_ui/core/images/cust-logo-split-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Australian Open', | ||
logo: | ||
asset_path('ably_ui/core/images/cust-logo-ausopen-mono-pos.svg') | ||
} | ||
] | ||
%> | ||
|
||
<%= react_component('customerLogos', companies: companies) %> | ||
|
||
<% content_for :component do %> | ||
<script type="text/javascript"> | ||
document.body.classList.add("bg-light-grey", "m-32"); | ||
</script> | ||
<% end %> |
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,45 @@ | ||
<%= render(TitleComponent.new(react: true, vw: true)) do %> | ||
Customer logos | ||
<% end %> | ||
|
||
<% | ||
companies = [ | ||
{ | ||
label: 'Hubspot', | ||
logo: | ||
asset_path('ably_ui/core/images/cust-logo-hubspot-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Hopin', | ||
logo: asset_path('ably_ui/core/images/cust-logo-hopin-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Bloomberg', | ||
logo: | ||
asset_path('ably_ui/core/images/cust-logo-bloomberg-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Toyota', | ||
logo: | ||
asset_path('ably_ui/core/images/cust-logo-toyota-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Split', | ||
logo: asset_path('ably_ui/core/images/cust-logo-split-mono-pos.svg') | ||
}, | ||
{ | ||
label: 'Australian Open', | ||
logo: | ||
asset_path('ably_ui/core/images/cust-logo-ausopen-mono-pos.svg') | ||
} | ||
] | ||
%> | ||
|
||
|
||
<%= render(AblyUi::Core::CustomerLogos.new(companies: companies)) %> | ||
|
||
<% content_for :component do %> | ||
<script type="text/javascript"> | ||
document.body.classList.add("bg-light-grey", "m-32"); | ||
</script> | ||
<% end %> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
# yarn lockfile v1 | ||
|
||
|
||
"@ably/[email protected]": | ||
version "5.2.0" | ||
resolved "https://registry.yarnpkg.com/@ably/ui/-/ui-5.2.0.tgz#e4314450098ee5d1673576455042ba7379569e56" | ||
integrity sha512-IJI+RxzWvUYPFXihx0TuZBGduHWEcMKCB13LDojD9Qu/fR1EdHFGT790Bnh5AWnjYGYl7GQOYkUnYAS11xYXqw== | ||
"@ably/[email protected]-dev.a4067b7": | ||
version "5.2.0-dev.a4067b7" | ||
resolved "https://registry.yarnpkg.com/@ably/ui/-/ui-5.2.0-dev.a4067b7.tgz#589002855600475a5f58d68fdca3262ada167bea" | ||
integrity sha512-7me7RYx+KEga4jB/9hDoqUib7VhsLZT47ivmwMIkFqvZBE/hY4Sb90oJkX0VboZucP3A5HTZgIOT4UlJ2Xr2Og== | ||
dependencies: | ||
array-flat-polyfill "^1.0.1" | ||
deepmerge "^4.2.2" | ||
|
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,9 @@ | ||
<section class="w-full bg-white"> | ||
<ul class="py-64 flex flex-row flex-wrap md:flex-nowrap content-between m-auto items-center"> | ||
<% companies.each do |company| %> | ||
<li class="flex-auto text-center sm:w-1/3 w-1/2"> | ||
<%= image_tag company[:logo], alt: "#{company[:label]} logo", class: 'mx-auto' %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</section> |
Empty file.
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,27 @@ | ||
import React from "react"; | ||
import T from "prop-types"; | ||
|
||
const CustomerLogos = ({ companies }) => { | ||
return ( | ||
<section className="w-full bg-white"> | ||
<ul className="py-64 flex flex-row flex-wrap md:flex-nowrap content-between m-auto items-center"> | ||
{companies.map((company) => ( | ||
<li key={company.label} className="flex-auto text-center sm:w-1/3 w-1/2"> | ||
<img alt={company.label} src={company.logo} className="mx-auto" /> | ||
</li> | ||
))} | ||
</ul> | ||
</section> | ||
); | ||
}; | ||
|
||
CustomerLogos.propTypes = { | ||
companies: T.arrayOf( | ||
T.shape({ | ||
label: T.string, | ||
logo: T.string, | ||
}) | ||
), | ||
}; | ||
|
||
export default CustomerLogos; |
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,13 @@ | ||
require 'json' | ||
|
||
module AblyUi | ||
module Core | ||
class CustomerLogos < ViewComponent::Base | ||
attr_reader :companies | ||
|
||
def initialize(companies:) | ||
@companies = companies | ||
end | ||
end | ||
end | ||
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.