-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change existing icons to React wrapper components * Add `icons` plugin to expose Icon components to plugin system * Create components that re-export Lock and Unlock components so they can be changed separately in Authorise top button and Authorise operation summary button * Add new Lock and Unlock icons to `auth` plugin --------- Co-authored-by: Vladimír Gorej <vladimir.gorej@smartbear.com>
- Loading branch information
1 parent
be9f944
commit f3ea2a2
Showing
24 changed files
with
386 additions
and
36 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
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
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,17 @@ | ||
/** | ||
* @prettier | ||
*/ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
|
||
const LockAuthOperation = ({ getComponent, ...props }) => { | ||
const LockIcon = getComponent("LockIcon") | ||
|
||
return <LockIcon {...props} /> | ||
} | ||
|
||
LockAuthOperation.propTypes = { | ||
getComponent: PropTypes.func.isRequired | ||
} | ||
|
||
export default LockAuthOperation |
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,17 @@ | ||
/** | ||
* @prettier | ||
*/ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
|
||
const LockAuth = ({ getComponent, ...props }) => { | ||
const LockIcon = getComponent("LockIcon") | ||
|
||
return <LockIcon {...props} /> | ||
} | ||
|
||
LockAuth.propTypes = { | ||
getComponent: PropTypes.func.isRequired | ||
} | ||
|
||
export default LockAuth |
17 changes: 17 additions & 0 deletions
17
src/core/plugins/auth/components/unlock-auth-operation.jsx
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,17 @@ | ||
/** | ||
* @prettier | ||
*/ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
|
||
const UnlockAuthOperation = ({ getComponent, ...props }) => { | ||
const UnlockIcon = getComponent("UnlockIcon") | ||
|
||
return <UnlockIcon {...props} /> | ||
} | ||
|
||
UnlockAuthOperation.propTypes = { | ||
getComponent: PropTypes.func.isRequired | ||
} | ||
|
||
export default UnlockAuthOperation |
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,17 @@ | ||
/** | ||
* @prettier | ||
*/ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
|
||
const UnlockAuth = ({ getComponent, ...props }) => { | ||
const UnlockIcon = getComponent("UnlockIcon") | ||
|
||
return <UnlockIcon {...props} /> | ||
} | ||
|
||
UnlockAuth.propTypes = { | ||
getComponent: PropTypes.func.isRequired | ||
} | ||
|
||
export default UnlockAuth |
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,33 @@ | ||
/** | ||
* @prettier | ||
*/ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
|
||
const ArrowDown = ({ className, width, height }) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 20 20" | ||
className={className} | ||
width={width} | ||
height={height} | ||
aria-hidden="true" | ||
focusable="false" | ||
> | ||
<path d="M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"/> | ||
</svg> | ||
) | ||
|
||
ArrowDown.propTypes = { | ||
className: PropTypes.string, | ||
width: PropTypes.string, | ||
height: PropTypes.string, | ||
} | ||
|
||
ArrowDown.defaultProps = { | ||
className: null, | ||
width: 20, | ||
height: 20, | ||
} | ||
|
||
export default ArrowDown |
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,33 @@ | ||
/** | ||
* @prettier | ||
*/ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
|
||
const ArrowUp = ({ className, width, height }) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 20 20" | ||
className={className} | ||
width={width} | ||
height={height} | ||
aria-hidden="true" | ||
focusable="false" | ||
> | ||
<path d="M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z"/> | ||
</svg> | ||
) | ||
|
||
ArrowUp.propTypes = { | ||
className: PropTypes.string, | ||
width: PropTypes.string, | ||
height: PropTypes.string, | ||
} | ||
|
||
ArrowUp.defaultProps = { | ||
className: null, | ||
width: 20, | ||
height: 20, | ||
} | ||
|
||
export default ArrowUp |
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,33 @@ | ||
/** | ||
* @prettier | ||
*/ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
|
||
const Arrow = ({ className, width, height }) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 20 20" | ||
className={className} | ||
width={width} | ||
height={height} | ||
aria-hidden="true" | ||
focusable="false" | ||
> | ||
<path d="M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"/> | ||
</svg> | ||
) | ||
|
||
Arrow.propTypes = { | ||
className: PropTypes.string, | ||
width: PropTypes.string, | ||
height: PropTypes.string, | ||
} | ||
|
||
Arrow.defaultProps = { | ||
className: null, | ||
width: 20, | ||
height: 20, | ||
} | ||
|
||
export default Arrow |
Oops, something went wrong.