From 2a25e1a3d8eb2b8bc33d0c127dd351b128f9c4c1 Mon Sep 17 00:00:00 2001 From: Ryan Srofe Date: Thu, 23 Jun 2022 11:53:09 -0400 Subject: [PATCH 1/6] add React Native Owl SVG and ref in index --- src/assets/featuredLogos/index.js | 4 +++- src/assets/featuredLogos/owl.svg | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 src/assets/featuredLogos/owl.svg diff --git a/src/assets/featuredLogos/index.js b/src/assets/featuredLogos/index.js index de4abb5..6e0796f 100644 --- a/src/assets/featuredLogos/index.js +++ b/src/assets/featuredLogos/index.js @@ -3,11 +3,13 @@ import victory from "./victory.svg"; import spectacle from "./spectacle.svg"; import urql from "./urql.svg"; import nuka from "./nuka.svg"; +import owl from "./owl.svg"; export default { renature, victory, spectacle, urql, - nuka + nuka, + owl, }; diff --git a/src/assets/featuredLogos/owl.svg b/src/assets/featuredLogos/owl.svg new file mode 100644 index 0000000..26b9d81 --- /dev/null +++ b/src/assets/featuredLogos/owl.svg @@ -0,0 +1 @@ +React Native Owl \ No newline at end of file From 6a6c825e86e7dd35ed28f831a2225c7400efea98 Mon Sep 17 00:00:00 2001 From: Ryan Srofe Date: Thu, 23 Jun 2022 11:56:57 -0400 Subject: [PATCH 2/6] add small logos with icon only no text these svg files have been compressed leaving classNames intact, also added role and aria-labelledby attributes --- src/assets/smallLogos/index.js | 15 +++++++++++++++ src/assets/smallLogos/nuka.svg | 1 + src/assets/smallLogos/owl.svg | 1 + src/assets/smallLogos/renature.svg | 1 + src/assets/smallLogos/spectacle.svg | 1 + src/assets/smallLogos/urql.svg | 1 + src/assets/smallLogos/victory.svg | 1 + 7 files changed, 21 insertions(+) create mode 100644 src/assets/smallLogos/index.js create mode 100644 src/assets/smallLogos/nuka.svg create mode 100644 src/assets/smallLogos/owl.svg create mode 100644 src/assets/smallLogos/renature.svg create mode 100644 src/assets/smallLogos/spectacle.svg create mode 100644 src/assets/smallLogos/urql.svg create mode 100644 src/assets/smallLogos/victory.svg diff --git a/src/assets/smallLogos/index.js b/src/assets/smallLogos/index.js new file mode 100644 index 0000000..6e0796f --- /dev/null +++ b/src/assets/smallLogos/index.js @@ -0,0 +1,15 @@ +import renature from "./renature.svg"; +import victory from "./victory.svg"; +import spectacle from "./spectacle.svg"; +import urql from "./urql.svg"; +import nuka from "./nuka.svg"; +import owl from "./owl.svg"; + +export default { + renature, + victory, + spectacle, + urql, + nuka, + owl, +}; diff --git a/src/assets/smallLogos/nuka.svg b/src/assets/smallLogos/nuka.svg new file mode 100644 index 0000000..96c7b6c --- /dev/null +++ b/src/assets/smallLogos/nuka.svg @@ -0,0 +1 @@ +Nuka \ No newline at end of file diff --git a/src/assets/smallLogos/owl.svg b/src/assets/smallLogos/owl.svg new file mode 100644 index 0000000..20547cf --- /dev/null +++ b/src/assets/smallLogos/owl.svg @@ -0,0 +1 @@ +React Native Owl \ No newline at end of file diff --git a/src/assets/smallLogos/renature.svg b/src/assets/smallLogos/renature.svg new file mode 100644 index 0000000..101aa1d --- /dev/null +++ b/src/assets/smallLogos/renature.svg @@ -0,0 +1 @@ +Renature \ No newline at end of file diff --git a/src/assets/smallLogos/spectacle.svg b/src/assets/smallLogos/spectacle.svg new file mode 100644 index 0000000..6ba1bdf --- /dev/null +++ b/src/assets/smallLogos/spectacle.svg @@ -0,0 +1 @@ +Spectacle \ No newline at end of file diff --git a/src/assets/smallLogos/urql.svg b/src/assets/smallLogos/urql.svg new file mode 100644 index 0000000..204486f --- /dev/null +++ b/src/assets/smallLogos/urql.svg @@ -0,0 +1 @@ +URQL \ No newline at end of file diff --git a/src/assets/smallLogos/victory.svg b/src/assets/smallLogos/victory.svg new file mode 100644 index 0000000..8597d37 --- /dev/null +++ b/src/assets/smallLogos/victory.svg @@ -0,0 +1 @@ +Victory \ No newline at end of file From 1bd80a375f2ea18f9ecbee9e8f7f3ebca22cad52 Mon Sep 17 00:00:00 2001 From: Ryan Srofe Date: Thu, 23 Jun 2022 11:57:59 -0400 Subject: [PATCH 3/6] compress and add accessibility attr these svg files have been compressed leaving classNames intact, also added role and aria-labelledby attributes --- src/assets/featuredLogos/nuka.svg | 47 +-------------------- src/assets/featuredLogos/renature.svg | 57 +------------------------- src/assets/featuredLogos/spectacle.svg | 41 +----------------- src/assets/featuredLogos/urql.svg | 45 +------------------- src/assets/featuredLogos/victory.svg | 26 +----------- 5 files changed, 5 insertions(+), 211 deletions(-) diff --git a/src/assets/featuredLogos/nuka.svg b/src/assets/featuredLogos/nuka.svg index 9d33cbf..f9f313e 100644 --- a/src/assets/featuredLogos/nuka.svg +++ b/src/assets/featuredLogos/nuka.svg @@ -1,46 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Nuka \ No newline at end of file diff --git a/src/assets/featuredLogos/renature.svg b/src/assets/featuredLogos/renature.svg index 01bdcdd..c95ec3d 100644 --- a/src/assets/featuredLogos/renature.svg +++ b/src/assets/featuredLogos/renature.svg @@ -1,56 +1 @@ - - - - Renature - Created with sketchtool. - - - - - - - - - - - - RENATURE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file +Renature \ No newline at end of file diff --git a/src/assets/featuredLogos/spectacle.svg b/src/assets/featuredLogos/spectacle.svg index 43eac34..baae2dc 100644 --- a/src/assets/featuredLogos/spectacle.svg +++ b/src/assets/featuredLogos/spectacle.svg @@ -1,40 +1 @@ - - - - Spectacle - Created with sketchtool. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SPECTACLE - - - - - \ No newline at end of file +Spectacle \ No newline at end of file diff --git a/src/assets/featuredLogos/urql.svg b/src/assets/featuredLogos/urql.svg index 8591daa..d525704 100644 --- a/src/assets/featuredLogos/urql.svg +++ b/src/assets/featuredLogos/urql.svg @@ -1,44 +1 @@ - - - - Urql - Created with sketchtool. - - - - - - - - - - - - - URQL - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file +URQL \ No newline at end of file diff --git a/src/assets/featuredLogos/victory.svg b/src/assets/featuredLogos/victory.svg index 0635861..14be870 100644 --- a/src/assets/featuredLogos/victory.svg +++ b/src/assets/featuredLogos/victory.svg @@ -1,25 +1 @@ - - - - Victory - Created with sketchtool. - - - - - - - - VICTORY - - - - - - - - - - - - \ No newline at end of file +Victory \ No newline at end of file From 93ff599671598335ec412d0dc33659fdc02da127 Mon Sep 17 00:00:00 2001 From: Ryan Srofe Date: Thu, 23 Jun 2022 11:58:46 -0400 Subject: [PATCH 4/6] add new prop option for returning small icon only badges --- src/FeaturedBadge.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/FeaturedBadge.js b/src/FeaturedBadge.js index c7dfea3..29383fb 100644 --- a/src/FeaturedBadge.js +++ b/src/FeaturedBadge.js @@ -2,9 +2,12 @@ import React from "react"; import PropTypes from "prop-types"; import styled from "styled-components"; import featuredLogos from "./assets/featuredLogos"; +import smallLogos from "./assets/smallLogos"; -const FeaturedBadge = ({ name, className, isHoverable }) => { - const Logo = featuredLogos[name.toLowerCase()]; +const FeaturedBadge = ({ name, className, isHoverable, small }) => { + const Logo = small + ? smallLogos[name.toLowerCase()] + : featuredLogos[name.toLowerCase()]; if (!Logo) return null; const StyledLogo = styled(({ isHoverable, ...rest }) => )` ${({ isHoverable }) => @@ -38,11 +41,13 @@ FeaturedBadge.propTypes = { }, className: PropTypes.string, isHoverable: PropTypes.bool, + small: PropTypes.bool, }; FeaturedBadge.defaultProps = { className: "", isHoverable: false, + small: false, }; export default FeaturedBadge; From 003d903ab51787c62c00fbe60df0bfa8c10ad91f Mon Sep 17 00:00:00 2001 From: Ryan Srofe Date: Thu, 23 Jun 2022 11:59:20 -0400 Subject: [PATCH 5/6] add RNO to examples --- examples/src/App.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/src/App.js b/examples/src/App.js index 6185e2c..6244821 100644 --- a/examples/src/App.js +++ b/examples/src/App.js @@ -58,11 +58,7 @@ const App = () => (

Example of IconBadge using a png

- + (

Nuka ProjectBadge

+
+ +

React Native Owl ProjectBadge

+
); From a74eb07ab280db758954677fe5c650039a047ccb Mon Sep 17 00:00:00 2001 From: Ryan Srofe Date: Thu, 23 Jun 2022 11:59:52 -0400 Subject: [PATCH 6/6] update readme add all additional props for featured badge --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ff508f..570eca9 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,15 @@ See [featuredLogos](https://github.com/FormidableLabs/formidable-oss-badges/tree - `urql` - `victory` - `nuka` +- `owl` + +### Additional props + +| Prop | Type | Description | Default | +| ----------- | ------- | ------------------------ | ------- | +| className | String | Additional class names | `''` | +| isHoverable | Boolean | Add hover style effects | `false` | +| small | Boolean | Small badge w/ icon only | `false` | ## IconBadge @@ -126,7 +135,6 @@ ProjectBadge with svg child: ### IconBadge Usage - **Example 4**: ```jsx @@ -173,7 +181,6 @@ You can then edit `examples/src/App.js`, either by returning the components dire Note that this array is currently just used for passing _props_ into `` and not for passing children or for rendering ``. - ## Maintenance Status **Active:** Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.