-
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.
Merge pull request #1308 from Bynder/feature/new-bynder-logo
Adding new Bynder logo
- Loading branch information
Showing
10 changed files
with
114 additions
and
17 deletions.
There are no files selected for viewing
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.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Logo | ||
A logo component which defaults to the GatherContent logo | ||
|
||
### Props | ||
|
||
| Name | Type | Default | Required | Description | | ||
| ------------------- |-------------- | --------------------------- | -------- |------------------------------- | | ||
| url | String | '' | No | Image URL for the logo | | ||
| alt | String | 'GatherContent Logo' | No | Alt attribute for the logo | | ||
###Usage | ||
``` | ||
<Logo url="http://example.com/myimage.png" alt="Alt Tag" /> | ||
``` |
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,28 @@ | ||
import React from "react"; | ||
import logoGCSVG from "../../assets/logogc.svg"; | ||
|
||
/** | ||
* @usage | ||
* | ||
* <Logo url="http://example.com/myimage.png" alt="Alt Tag" /> | ||
*/ | ||
|
||
export function LogoGC(props: any) { | ||
const LogoPath = props.url || logoGCSVG; | ||
const image = | ||
typeof LogoPath === "string" ? ( | ||
<img src={props.url} alt={props.alt} className="logo__image" /> | ||
) : ( | ||
<span className="logo__image"> | ||
<LogoPath /> | ||
</span> | ||
); | ||
return <span className="logo">{image}</span>; | ||
} | ||
|
||
LogoGC.defaultProps = { | ||
url: "", | ||
alt: "GatherContent Logo", | ||
}; | ||
|
||
export default LogoGC; |
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 @@ | ||
/* ========================================================================== | ||
Config | ||
========================================================================== */ | ||
$logo-max-height: 40px !default; | ||
$logo-max-width: 150px !default; | ||
|
||
/* ========================================================================== | ||
Styles | ||
========================================================================== */ | ||
.logo__image { | ||
max-width: $logo-max-width; | ||
max-height: $logo-max-height; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
import LogoGCComponent from "../../lib/LogoGC"; | ||
import StoryItem from "../styleguide/StoryItem"; | ||
|
||
export default { | ||
title: "Legacy/LogoGC", | ||
component: LogoGCComponent, | ||
}; | ||
|
||
export const LogoGC = () => ( | ||
<div> | ||
<StoryItem title="Default Logo" description="A wrapper around the logo"> | ||
<div> | ||
<LogoGCComponent /> | ||
</div> | ||
</StoryItem> | ||
|
||
<StoryItem title="Custom Logo" description=""> | ||
<LogoGCComponent | ||
url="https://dummyimage.com/150x40/3d8beb/fff.png" | ||
alt="Alt Tag" | ||
/> | ||
</StoryItem> | ||
</div> | ||
); | ||
|
||
LogoGC.parameters = { | ||
controls: { hideNoControlsWarning: true }, | ||
}; |